I'm using my Camera as the origin for a Raycast Node that fires in the forward direction on on success it show dialogue HIT.
I also have the Raycast Node store the hit position Vector3 as Set mousePos Global Variable.
When I press play the dialogue HIT shows on my screen hovering over objects but when I go to check Makinom Vector3 Variables it shows mousePos at (0.0, 0.0, 0.0) as if it isn't being stored at all.
I'm trying to get the an object to move in my scene by clicking and dragging on them by using the above variable mousePos with a Change Position Node.
What am I doing wrong?
Please help!
Thanks
Since variable isn't set, be sure to check for spelling mistakes and if you're using the correct variable origin, or if the variable is changed somwhere else as well.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
This is the Global Variable I made and the schematic on my object I want to move
">
This is on my main camera and Hit Point Key mouseRayPos is from value
Follow my project on Reddit - My Game DevLog
relentingVids - My YouTube Channel
Half Super Shop - My Shop
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thanks again GIL =]
Follow my project on Reddit - My Game DevLog
relentingVids - My YouTube Channel
Half Super Shop - My Shop
I'm writing this down for others who may find this challenging:
Add Interaction Machine on the desired object and check "Mouse Drag"
Create a new schematic with the following nodes:
Mouse Touch Delta: set value to local variable 'mouseDelta'
Vector3 Multiply:
[variable settings]: set value to local variable 'posPoint'
[vector3 value]: use local value of vector3 'mouseDelta'
[multiply by]: value 0.01111
Change Position:
[position]: Set Axis X and Y (for 2d games) with X and Y local aspects of 'posPoint'
[position]: math function negate Y axis to invert move direction
[position]: check 'local position'
I'll post my schematic once I get some pics.
Follow my project on Reddit - My Game DevLog
relentingVids - My YouTube Channel
Half Super Shop - My Shop
Hope this helps anyone interested!
=]
My Tutorial For Mouse Dragging
Follow my project on Reddit - My Game DevLog
relentingVids - My YouTube Channel
Half Super Shop - My Shop