Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (henrybane), 530 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Baklazhan, Hanky27, firatv, wandaluciaia, Mega_Rod
19052 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to get pushed #9506
06/20/02 07:11
06/20/02 07:11
Joined: Jun 2002
Posts: 248
NZ
mudhole Offline OP
Member
mudhole  Offline OP
Member

Joined: Jun 2002
Posts: 248
NZ
I'm on the lookout for a good implementation of pushing. I've set up my entities with the right push values, and set enable_push for my player, but I'm having trouble getting the player to move (smoothly) out of the way of the pushing object.

I've tried setting the players external forces using the pushing objects forces, but the problem is that he's already stuck in the object, so he doesn't move as far as he should. I know I could move him within the event function and ignore_you, but this seems kind of a hack rather than real pushing. Another problem is when the player is hit by a (map) entity that is rotating. The other entity isn't 'moving' so no collision is detected.

My ideal push routine would do this:
1. determine which direction the player should be pushed. This is related to the normal of the polygon that collided with the player, and also the direction the pusher is moving.
2. apply some kind of force to the players external forces so that he moves just enough out of the way to be outside the pusher, but not too far that the movement is jumpy (ie player gets pushed, then it takes some time for the object to hit him again and push him some more). If the player is in front of a constant speed moving block, he should be pushed along at a constant speed.
3. player moves (within his own action, not the event function) out of the way. He doesn't get stuck halfway and then start floating up the other entity like my push function does now.
4. really cool would be for the player to get crushed if he is being pushed into a wall or another map entity

Any ideas/suggestions?

Thanks in advance

Re: how to get pushed #9507
06/24/02 05:58
06/24/02 05:58
Joined: Jun 2002
Posts: 248
NZ
mudhole Offline OP
Member
mudhole  Offline OP
Member

Joined: Jun 2002
Posts: 248
NZ
sorry to bump this, I'm pretty stuck.

Does anyone have a good implementation of pushing?

Re: how to get pushed #9508
06/25/02 17:20
06/25/02 17:20

A
Anonymous
Unregistered
Anonymous
Unregistered
A



That's some tricky coding there. I haven't got a clue.

If you find a way to change values using polygon normals, tell me, because I've got a feeling that information would be priceless.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1