[T3D 1.1 Beta 3] still dosent work mouse click - NOT A BUG
by Enel · in Torque 3D Professional · 02/23/2010 (4:00 pm) · 16 replies
Build: 1.1 Beta 3
Platform: Windows XP, 32
Target : PlayGui ( Play Control )
Issues: Mouse moveMap.bind dosent work
Steps to Repeat:
1. above code copy and apply Default.bind.cs
2. Launch the game
3. right Click
4. mouseTrigger dosent work.
Mouse Click is use temporarily GlobalActionMap function.
but it isnt completely solve
Platform: Windows XP, 32
Target : PlayGui ( Play Control )
Issues: Mouse moveMap.bind dosent work
function mouseTrigger(%val)
{
if(%val)
hidecursor();
else
showcursor();
}
moveMap.bind( mouse, button1, mouseTrigger );Steps to Repeat:
1. above code copy and apply Default.bind.cs
2. Launch the game
3. right Click
4. mouseTrigger dosent work.
Mouse Click is use temporarily GlobalActionMap function.
but it isnt completely solve
About the author
Recent Threads
#2
i have try to make camera rotation like WOW style
if you can see playing WOW.. right mouse button push then move camera rotation
and i have add config.cs :) anything right but dosent work..
02/25/2010 (6:56 pm)
#Toddi have try to make camera rotation like WOW style
if you can see playing WOW.. right mouse button push then move camera rotation
and i have add config.cs :) anything right but dosent work..
#3
In scripts/client/default.bind.cs, comment these lines out as shown:
to disable the default mouselook.
If you have a scripts/client/config.cs file, delete it, so Torque accepts and uses your changes to default.bind.cs. Torque will recreate it later when it wants it, but will not pick up changes to default.bind.cs while it is present.
In scripts/gui/playGui.cs, add this snippet at the bottom of the file**:
The behavior I get from this is such that the cursor hides and the camera attaches to the mouse rotation when the right mouse button is held down. When the button is released, the cursor is shown once more, and the camera is let go.
*I'm sure right-mouseclick camera rotation is identical in both games.
**I'm sure there is a better way to code this, even a proper way to code this, but it's just not springing forth fully formed from my forehead. Sorry to disappoint...
03/03/2010 (10:07 pm)
See, your problem stems from using WOW as your reference framing... you need to study City of Heroes instead* :PIn scripts/client/default.bind.cs, comment these lines out as shown:
//moveMap.bind( mouse, xaxis, yaw ); //moveMap.bind( mouse, yaxis, pitch );
to disable the default mouselook.
If you have a scripts/client/config.cs file, delete it, so Torque accepts and uses your changes to default.bind.cs. Torque will recreate it later when it wants it, but will not pick up changes to default.bind.cs while it is present.
In scripts/gui/playGui.cs, add this snippet at the bottom of the file**:
function onRightMouseLook( %val ) {
if (%val) {
hideCursor();
moveMap.bind(mouse,xaxis,yaw);
moveMap.bind(mouse,yaxis,pitch);
} else {
showCursor();
}
}
globalActionMap.bind( mouse, button1, onRightMouseLook );The behavior I get from this is such that the cursor hides and the camera attaches to the mouse rotation when the right mouse button is held down. When the button is released, the cursor is shown once more, and the camera is let go.
*I'm sure right-mouseclick camera rotation is identical in both games.
**I'm sure there is a better way to code this, even a proper way to code this, but it's just not springing forth fully formed from my forehead. Sorry to disappoint...
#4
The Right Mouse Button Works. But when i have called Left Mouse Button
Its not working.
If i have assumed
function onLeftMouseLook( %val ) {
if (%val) {
hideCursor();
moveMap.bind(mouse,xaxis,yaw);
moveMap.bind(mouse,yaxis,pitch);
} else {
showCursor();
}
}
globalActionMap.bind( mouse0, button0, onLeftMouseLook );
I cant even click the Play Button.
How i can i bind the yaw and pitch to the Left Mouse Button.
06/08/2010 (10:11 pm)
@Netwyrm Thank you For Your reply.The Right Mouse Button Works. But when i have called Left Mouse Button
Its not working.
If i have assumed
function onLeftMouseLook( %val ) {
if (%val) {
hideCursor();
moveMap.bind(mouse,xaxis,yaw);
moveMap.bind(mouse,yaxis,pitch);
} else {
showCursor();
}
}
globalActionMap.bind( mouse0, button0, onLeftMouseLook );
I cant even click the Play Button.
How i can i bind the yaw and pitch to the Left Mouse Button.
#5
Sorry for any confusion, but just swapping buttons is going to lead to a fail to pass through the click to the GUI (as you noticed).
To use the left mouse button, you should go back to your first thread and reread what Manoel wrote--you will have to swap out action responses based on your state, and it's a little more complicated (well, ok, maybe a lot) an effect to pull off.
06/09/2010 (9:46 am)
What I meant by "moved the buttons around" was if you weren't absolutely committed to doing it with the left mouse, and were ok with doing it with the right mouse, it's fairly easy to do with the code snip.Sorry for any confusion, but just swapping buttons is going to lead to a fail to pass through the click to the GUI (as you noticed).
To use the left mouse button, you should go back to your first thread and reread what Manoel wrote--you will have to swap out action responses based on your state, and it's a little more complicated (well, ok, maybe a lot) an effect to pull off.
#6
08/21/2010 (9:58 am)
Logged as TQA-888.
#7
08/31/2010 (4:26 pm)
Marking this as not a bug, tagged for general discussion.
#8
With your global bind on the the left mouse button how are you even clicking Play and choosing a map?
Edit: Netwyrm beat me to it, must learn to read whole threads before posting, but it doesn't look like I'm the only one. :p
09/02/2010 (6:07 pm)
/FollowWith your global bind on the the left mouse button how are you even clicking Play and choosing a map?
Edit: Netwyrm beat me to it, must learn to read whole threads before posting, but it doesn't look like I'm the only one. :p
#9
omg..
we are active gui only using Left Mouse click?
if you say we cant equip item action use right click when use this code
it is definitely bug
we need clicking play
01/25/2011 (5:55 pm)
It is not bug??omg..
we are active gui only using Left Mouse click?
if you say we cant equip item action use right click when use this code
function mouseTrigger(%val)
{
if(%val)
hidecursor();
else
showcursor();
}
GlobalActionMap.bind( mouse, button1, mouseTrigger );it is definitely bug
we need clicking play
#10
function PlayGui::onRightMouseDown(%this, %pos, %start, %ray)
{
}
01/25/2011 (10:53 pm)
maybe you can tryfunction PlayGui::onRightMouseDown(%this, %pos, %start, %ray)
{
}
#11
i have try like this
but onRightMouseUp function dosent called..
01/25/2011 (11:05 pm)
@Ray Huangi have try like this
function PlayGui::onRightMouseDown(%this, %pos, %start, %ray)
{
hidecursor();
}
function PlayGui::onRightMouseUp(%this, %pos, %start, %ray)
{
showcursor();
}but onRightMouseUp function dosent called..
#12
I am also setting the camera to orbit at times in the game. This right mouse works for that. Now I need to figure out how to move in and out while orbiting.
I have found that if I use moveMap instead of GlobalAction Map, I can get the rightMouseUp/down events to fire if I don't show/hide the cursor. As soon as the cursor is hidden, you no longer get the mouse up event. Frustrating
01/26/2011 (6:41 am)
I'm just using an observer camera that is not tied to a player so I don't know if this would work for a player camera. Here's the code:function toggleFreeLook( %val )
{
if ( %val ) {
$mvFreeLook = true;
hideCursor();
}
else {
$mvFreeLook = false;
showCursor();
}
}
GlobalActionMap.bind( mouse, button1, toggleFreeLook );I am also setting the camera to orbit at times in the game. This right mouse works for that. Now I need to figure out how to move in and out while orbiting.
I have found that if I use moveMap instead of GlobalAction Map, I can get the rightMouseUp/down events to fire if I don't show/hide the cursor. As soon as the cursor is hidden, you no longer get the mouse up event. Frustrating
#13
There were hacks to get this to work in TGEA, I was just hoping this would be a feature in T3D.
Why the need to lock the mouse bind when the cursor is visable? Why not move that bit of code to lock the mouse bind when a MENU is visable? Or better yet, have all menu's with a mouselock flag and the mouse unlocked to everything as a default.
04/14/2011 (9:20 am)
Same problem here. Just posted about this in the forums. I'm also looking to create the same controls as seen in WoW and most other RPG style games out there. Hold down left mouse for freelook and hide cursor, Hold down right mouse for normal 3rd person control and hide cursor and no mouse shows cursor so you can click on items in the game world.There were hacks to get this to work in TGEA, I was just hoping this would be a feature in T3D.
Why the need to lock the mouse bind when the cursor is visable? Why not move that bit of code to lock the mouse bind when a MENU is visable? Or better yet, have all menu's with a mouselock flag and the mouse unlocked to everything as a default.
#14
So, since this isn't a bug, can we ask for it as a feature request? The feature I'm requesting is that the engine cease filtering input and let me do it myself. Please?
04/14/2011 (9:28 am)
I'm still not sure why the engine cares what the mouse does when I'm not looking - if I code a catch for onRightMouseUp() then I want to catch it regardless. I can filter cursor state inside if I want to.So, since this isn't a bug, can we ask for it as a feature request? The feature I'm requesting is that the engine cease filtering input and let me do it myself. Please?
#15
www.garagegames.com/community/forums/viewthread/124192
it is already solved problem...
04/14/2011 (9:31 am)
this thread change towww.garagegames.com/community/forums/viewthread/124192
it is already solved problem...
#16
04/14/2011 (9:32 am)
I just saw that by following a different route to that thread - lol - thanks and a good idea to round these all up.
Torque Owner Henry Todd
Atomic Walrus
You can use globalActionMap to bypass everything, including GUI mouse input hooks, however then your mouse button will always trigger this function regardless of what GUI element is currently active.
If that doesn't help, then I must not understand exactly what you're trying to do, and more details would be helpful.