Posts: 1,556
Threads: 77
Joined: May 2011
So my question goes:
How do I make a ball which is moving in the z-axis bounces back (in the z-axis) upon reaching a z-boundary?
Thanks in advance.
Thanks given by:
Posts: 595
Threads: 54
Joined: Jan 2012
What do you exactly want to make? Do you mind explaining it more?
...............
Thanks given by:
Posts: 1,073
Threads: 38
Joined: Mar 2008
06-17-2013, 06:37 PM
(This post was last modified: 06-17-2013, 06:43 PM by Azriel.)
In theory:
1) ball holds an invisible char, where the char has a zwidth: 1 or 2 (experiment with this)
2) in the rebound frames, ball will have two ik8s -> higher up in z axis = go to frame to travel downwards in z axis, lower in z axis = go to frame to travel upwards
(if you think about it, if the rebounded ball is lower, then the upper ik8 will interact, so you want to go down because the original ball was higher in z axis)
that's in theory though, Yinyin got this behaviour nearly working (had some issue with the hit sound happening twice), he might give you a better answer/method. I believe you can do this with wpoints as well and get rid of ik8
better theory, and i believe this is what yinyin used:
in the ball flying upwards in z-axis frames, it must hold onto a ball flying downwards as a weapon (invisible), and when it gets hit, it releases that downwards flying ball, which opoints a ball flying upwards and held as a weapon.
Azriel~
Posts: 2,340
Threads: 78
Joined: Mar 2008
06-18-2013, 10:21 AM
(This post was last modified: 06-18-2013, 10:29 AM by YinYin.)
I don't actually remember doing this ever, but I really like the idea and it shouldn't be too difficult depending on how flexible the blast should be.
By that I mean: Should you be able to rebound this thing normally? Also should it go straight like Woodys blasts after a rebound or back up/down the way it came from?
Either way I would suggest you to not use any character objects or even wpoints as both can get pretty messy on normal blasts.
I'd rather suggest you to use hit_a/d timers in combination with a self hit upon not moving along z any more (border condition) to set that case apart from the normal hit/hitting/rebound actions.
Also use two objects - one for flying up and one for flying down.
edit: If you don't want to set apart border/hit/hitting/rebound actions and make the blast bounce of characters the way it does on walls it would be even easier and you only have to do the self hit upon 0 z movement. Any interaction would make the blast change z direction.
(about the z condition: just make the blast constantly spawn an object that waits long enough for the blast to get away on z axis before it goes to a frame that would hit it)
Posts: 1,850
Threads: 44
Joined: Jul 2008
should totally make an study example out of it and post it here!
(some people learn by seeing it first hand)
[sig placeholder until my new sig is finished]
should totally allow people to be all trolley on their birthday
Thanks given by: