PDA

View Full Version : Request: Point & Click tutorial



fluoxvhlwe
12-05-2009, 01:11 PM
Hello there.
Are there any tuts about point & click? or mb someone have some advice about it?
I tryed to google it, but nothing was found ..
And i used forum serach ofcoz, and found a thread about converting mouse coordinates to the world coordinates, but its not enough ..

musilowski
12-05-2009, 03:15 PM
There are some tutorials on this. Make a search on these forums on mouse cursors and deprojections, something oughta come up.

The barebones is getting mouse coordinates and clamp them to the screen, then draw a cursor on those coordinates, after which you get 2D->3D coordinates, then trace to see whether there is something under the cursor. If there is, you need to detect a mouse click and perform a function desired for the object under the cursor (select the object, draw and overlay to it, activate it, and so on).

Getting this to work needs hours and hours of your time, but is certainly doable.

roychr
12-06-2009, 10:44 PM
You can get my mouse and gui mouse basic tutorial here, this week I will be working on the actual basics of the movement with navigation with Pawns. I have taken a break last week from all that is computer and taking this task ahead to meet my deadlines. I will expand on this so be sure to at least understand the basics.

http://x9productions.com/blog/?p=269

fluoxvhlwe
12-07-2009, 08:21 AM
You can get my mouse and gui mouse basic tutorial here, this week I will be working on the actual basics of the movement with navigation with Pawns. I have taken a break last week from all that is computer and taking this task ahead to meet my deadlines. I will expand on this so be sure to at least understand the basics.

http://x9productions.com/blog/?p=269

I already did it with ur tuts help. Thnx for ur work, its very helpful!
w8ting 4 ur next tutorials ..
Now Im reading this tutorial (http://udn.epicgames.com/Three/MasteringUnrealScriptFunctions.html#TUTORIAL%206.6 %20AMBIENT%20CREATURE,%20PART%20VI:%20SETDEST%28%2 9%20FUNCTION) and there is one strange thing - DesiredRotation .. in those tut we must change its value to something (our class extends Actor), but this property is removed from Actor..

Actor.uc:

/**
* PLEASE NOTE DesiredRotation is removed
* This DesiredRotation is moved to Pawn to remove redundant variables usage. (i.e. between Pawn and Controller)
* Pawn now handles all DesiredRotation and it is only one place.
* All Actor's DesiredRotation won't work anymore - Use RotationRate to control Actor's rotation
**/
so .. its looks like tutorial error .. or Im wrong?

roychr
12-07-2009, 12:13 PM
I will look into that, but DesiredRotation is set by a function named SetDesiredRotation. Both are in pawn.uc. My Guess is that Pawns rotations are handled like in the tutorial, but not other actors like camera for example.

Remember if you set manually DesiredRotation (which I do not think is a good idea) you must multiply it by a frame time (DeltaTime) because its a value of rotation for a single frame.