Item manipulation with the mouse
by Itay Hauptman · in Torque Game Engine · 02/27/2006 (4:27 am) · 3 replies
Hi everyone,
I'm new to Torque, so I will probably have a lot of questions... hope that's okay :)
I'm trying to create a game in which the player can interact with objects in the environrent by clicking them.
(and perhaps also dragging them to move or rotate)
What is the best way to do this?
Also, how can I "lock" the viewpoint, so the player will not move around with the keyboard
once he arrives in a ceratin place?
Thank you!
I'm new to Torque, so I will probably have a lot of questions... hope that's okay :)
I'm trying to create a game in which the player can interact with objects in the environrent by clicking them.
(and perhaps also dragging them to move or rotate)
What is the best way to do this?
Also, how can I "lock" the viewpoint, so the player will not move around with the keyboard
once he arrives in a ceratin place?
Thank you!
About the author
#2
Does object selection and maniuplation require re-compiling the engine? Or can this be done with scripts alone?
Also, how do make an arrow cursor qppear on the screen (and manipulate it with the mouse, of course)?
I will look into the ActionMap. does it also controle the mouse? (Il want to limit the player's ability to move the viewpoint with the mouse).
03/02/2006 (5:44 am)
Thank you for your reply!Does object selection and maniuplation require re-compiling the engine? Or can this be done with scripts alone?
Also, how do make an arrow cursor qppear on the screen (and manipulate it with the mouse, of course)?
I will look into the ActionMap. does it also controle the mouse? (Il want to limit the player's ability to move the viewpoint with the mouse).
Torque 3D Owner James Spellman
You'll also want to take a look at the WorldEditor. It'll do way more than you want and fry your brain to look at, but demonstrates most of the things you'll be interested in.
The ActionMap (labeled 'MoveMap') governs keypresses. You can set and clear bindings at will. default.bind.cs defines most keys. You could probably make a function call to bind/unbind a set of keys. A push/pop mechanism might be nice here if there is one.