Fixed rotation
kiwaci
Member, PRO Posts: 72
Hello,
i have an actor that's standing and i want when actor2 coming from his left witch will be winds hit him, i want him to fall but when he fall i want his feet to stay in there position , just like the hour hand in a clock
Thanks you
Comments
i did that but still the bottom of the actor rotate as well
I think I understand, you want him to rotate away from the 'wind' - but with his feet stuck to the ground ?
@socks that's right
Without joints in GameSalad it can be a little tricky, but I can think of a few different ways you might do it . . . . I'm sure @RThurman could probably conjure up come up some of his fiendishly clever maths if you asked him - this seems very related to his recent pendulum ideas.
Otherwise you could try this.
When the wind actor hits the 'hour hand' actor, it releases a 'weight' (invisible) that drops to the floor (invisible) - and the 'hour hand' actor uses the movement of this 'weight' to define its angle (via sin + cos).
The advantage to this method is that as the weight bounces when it hits the floor, so will the 'hour hand' actor, so you impart GameSalad's build it physics onto a rotating actor . . .
Hope that makes some sense !?
Like this:
...
thanks a lot for your efforts, that what i was looking for, but what are the behaviours in the "hour hand " actor, you said "the 'hour hand' actor uses the movement of this 'weight' to define its angle (via sin + cos)." , how can i do that ?
@socks can you please upload the project to mediafire ?
?
Here you go . . .
Link: https://www.mediafire.com/?4k4rej7qqy14iu2
I added a change velocity behaviour into the 'weight', so the fall starts off with more of a kick.
@socks Thanks a lot, you're awesome
No problem, good luck with your game.