just as the title says is there a way to lock how farm something can rotate. i got my controller working an what not but the rotation is stuck at 360 degrees an i dont see a way to lock it to say a 90 degree rotation
Try using the Clamp Transform step to limit the rotation between defined values.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Hm, yeah, could be that the clamp node isn't ideal for rotations - you can try checking the individual rotation axis using a Check Value node and set it if they exceed whatever values you need.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Will also try to add a better node for rotation limits :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
You need to check the rotation of the game object, the mouse input isn't the rotation but the mouse movement.
I.e. do the rotation with the mouse input, after that, check the rotation if it's beyond the limits you want and set it to the limits if it exceeds the value. Also, keep in mind that rotation vectors are looping, i.e. -90 could also be 270, etc.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I don't know if you're doing that in a 2nd Check Transform node, but you'll probably also need to check for -270, due to rotation vectors looping around ...
You could disable the rotation limiting for now and check the rotation of your camera when you rotate it with the mouse - you'll see the values you'll need to check for.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Edit: Ok, will add new options to clamping for rotation clamping. Also, try clamping Y and Z axis to 0 to prevent them changing due to X rotation changes (e.g. when looking straight up or down).
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
It will probably not work - at least in my tests I ran into the looping issue, but it may work on your end (using Y/Z clamp 0).
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
this still dose not stop the 360 rotation on the x axis :/
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
I.e. do the rotation with the mouse input, after that, check the rotation if it's beyond the limits you want and set it to the limits if it exceeds the value.
Also, keep in mind that rotation vectors are looping, i.e. -90 could also be 270, etc.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
an since im going from x axis set at 0 going a 90 degree angle for looking down an -90 degree's for looking up is correct numbers
check transform step
change rotation step
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
You could disable the rotation limiting for now and check the rotation of your camera when you rotate it with the mouse - you'll see the values you'll need to check for.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
Edit: Ok, will add new options to clamping for rotation clamping.
Also, try clamping Y and Z axis to 0 to prevent them changing due to X rotation changes (e.g. when looking straight up or down).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!