wanted to have a hatch open/close on my vehicle when a player enters the turret seat
I made the animation and all but I'm struggling to have it play in game
#TurretEventHook
58 messages · Page 1 of 1 (latest)
@deep creek link "Any state" to your animations, and link "Entry" to an empty state (create one)
you dont need the transitions from any state
just from entry to empty
you need to creae an animation clip, door open, and animate your door opening
then duplicate the clip inside the animator, rename it to close, set it's speed to -1
and lastly for your on passenger added/removed, you'll use animator > play (string) and type in the name of the clip (open/close)
make sure you check your animation clip so it's not looping. Any created clips loop by default
even the entry to empty transition is optional. You can just have close be the default state
the only thing you need to know is that the animator cant play the same clip again if it was played previously. When it ends and it has no transition, it's still considered active. You cant play the active clip again
this is the only situation where you need transitions
this is used for miniguns for example
a very short barrel spinning, non looped animation that transitions into a barrel stop animation
on shot fired you trigger animator.play(string) barrel_spin, over and over again, which will continuously spin since you are transitioning it into another animation clip, therefore the spin clip becomes inactive and can be called again
there's a better way for barrels nowadays but i explained it here as an idea/use case for transitions
also you can replace animators entirely and use animations
animators are very heavy on performance
for animations, it's a bit dumber to play them and they dont support transitions
but they are called once and that's it, rather than being active all the time and waiting for input
wait
animate the door opening in unity
I did it in blender
so where possible, use animations instead
in that case use animation, not animator
tho, you should re-do the animation in unity imo
makes things quite a bit easier
i personally never had any luck with blender animations
this is with an animator
it's used on an item to play the shooting animation
it has to be in that order
the enable/disable is optional i think
in my case it's needed cause of the reload animation
I think you meant to say "animation"
but basically I should do this?
sorry for ping btw
and this is the thing I want animated
yeah it should be something like that
i never actually tried using animations on vehicles so we'll see how it works
i'll probably convert most of my new mods to that so they take less performance
very nice
and just wanna ask
I'm guessing your Unturned Let Loose realistic tank rotation turrets need custom scripts that aren't very easy to make?
doesnt use any custom scripts
it doesnt even use a turret event hook because that didnt exist when i made it xD
wha...
i made it in 2020 when some russian guy told me my abrams sucks because it doesnt have a turret turning system, while his tank is much better because it had one. So i spent like 8 hours and made pretty much what i still use today
i'm pretty sure he blocked me afterwards
how do you even limit the turret's rotation speed
is this something that I'll just figure out if I learn a lot more of actual unity stuff?
😂