Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Playing a sprite above a physics objects
Started by DevilDev Jan 01 2019 05:13 PM

1 reply to this topic
sprite physics zombie derby
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Enthusiast

  • 77 posts
  • Corona SDK

I want to make a game like zombie derby.
In that game,zombies should walk on the mountains as the car moves.
To achieve this,I am thinking of adding  two wheels to the "zombie"  and hiding them.
Attached File  dt.png   16.29KB   0 downloads
Then when we applyTorque(),the zombie will move.
Is there am better way to walk the zombies on  curve shaped object?

[TOPIC: post.html]

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Corona Geek

  • 1,174 posts
  • Corona SDK

The first problem I see is that your zombies would fall over on those steep hills. You'd also have to increase and decrease the torque as the zombies would be going up or down those slopes.

I would recommend looking into moving the zombies along curved paths. There are a few old tutorials on how to approach this:

This way, you would control the zombies movement completely and they'd move exactly as fast as you wanted.

Moving characters on slopes isn't really as easy as it may seem. There's a lot of tricks and hacks involved, and I don't know if any game actually does it realistically. Each game just sort of has its own cheat to handling slopes.