Can you help me understand a few basic things?

Chipmunk2D Bindings for the Unity3D engine
Post Reply
binarypat
Posts: 11
Joined: Tue Oct 04, 2011 10:45 am
Contact:

Can you help me understand a few basic things?

Post by binarypat »

I am working on a platformer where the player runs horizontally and the enemy (a dragon) is flying.

When the player is in range, the enemy attacks by swooping down on the player. The enemies goal is to hit the player.

In the enemy's update method, I calculate the angle and direction that the enemy should fly in to hit the player and update the angleVelocity and Velocity on the enemies body.

Here are my questions:
a) is my solution to the problem correct?
b) would it better to update the angle instead of the angleVelocity?
c) would it be better to update force instead of velocity?

I do not understand the difference between velocity and force, and when I should set one or the other?

Admittedly I mostly flying blind with respect to physics, so feel free to recommend a book, sample code, or article that will enlighten me.

TIA

-Pat
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests