In my game, I have a container that gives away two items. When the container is opened, the two items (Which have the platformer behavior for gravity) are launched out at a force, and are expected to fall to the ground in an arcing motion for a more realistic feel.
However, when the items pop out, they don’t fall as intended. Rather, they sort of “glide” to the ground, which looks pretty weird.
Below is a mock up of what I currently have vs what I’m trying to accomplish.
I am using permanent forces for both objects. The instant force doesn’t do jack for what I’m trying to accomplish.
I won’t need the answer for just this problem. The answer will help with MANY things in my game where I need things to fall in a proper arc.
Any help is appreciated ^^
when the animation of the chest play open and you spawn the items set the gravity of the items to ie 400 place a timer o += item.gravity*Timedelta to each item then slowly in time increase the gravity of the items then when items collide floor stop
Sorry, it didn’t work. My events need Trigger Once in the conditions to make sure duplicates of the item don’t spill out.
Also, I tested this without the Trigger Once, but it didn’t make a difference.
Not that it matters, but this object is a bandage. I wanted to make the object lighter than the others, so I gave it less gravity.
something like that, try to tweak the gravity math:
Thanks, but it’s not working properly. I went to a new project to test this out, but when the object spawns, it kind of moves in some sort of a sine motion before it goes through the desired arc.
What should I do now? I’ve already tried the Physics behavior, but it probably isn’t going to work.
I don’t get that sine… even without the permanent force. Something wrong with your math?
Try something like this. without any platformer objects… Press j to create balls…
Thanks mate, your example works quite well. Simple, compact, and effective. Your solution has it all.
I tried it in my game an it’s quite an improvement ^^
Glad I could help. Good luck with your game…