jump up and hit a box to make it jolt abit? help

CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
so when playing my game, if you jump up and hit a box, it will drop something random but before it does that i want it to jolt up and down slightly to give it some cool nice effect, but when i try this the box just goes flying into the air???
at the moment i have on my boxes "not moveable" because if there moveable and the player walks on them, they will fall, and if they hit from below, the box will move.
i tried constraining the boxes motion to 0 and lots of stuff, so any help would be great thanks!

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    @CodeMonster, I can think of a couple ways you could do that depending on exactly what you have in mind.

    1. Create a frame based animation and run it when your player hits the box.

    2. Use Interpolate Behaviors to manually move the block up and back down when the player hits it.
  • CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
    thanks @jamie_c
    i did the interpolate rule, it doesnt work 100% it just interpolates all the way up, so i just had to work my way around it, it works alright but still adding a few tweaks
  • SocksSocks London, UK.Member Posts: 12,822
    @CodeMonster

    Here's a jolt for you . . . .
  • SocksSocks London, UK.Member Posts: 12,822
    . . . . + a more vertical version (which sounds like more the kind of thing you want ?)

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2013
    @CodeMonster

    . . . . this one settles into its rest state a little more naturally . . . .
  • CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
    thanks heaps @Socks
Sign In or Register to comment.