Hi Thomas,

If you're going to be using bounding boxes, instead of calculating the coords 
ahead of time, you can simply move the player and let the collision detection 
do its work. Yes?

If I'm missing your point let me know, K?

Again, thanks for this discussion.

Smiles,

Cara :)
---
View my Online Portfolio at:

http://www.onemodelplace.com/CaraQuinn

Follow me on Twitter!

https://twitter.com/ModelCara

On Jul 30, 2013, at 5:05 AM, Thomas Ward <thomasward1...@gmail.com> wrote:

Hi John,

Sure. Basically, the purpose of the GetX(), GetY(), and GetZ()
functions is to calculate the next possible coordinates along a
certain angle. Let's say you have a player object at (10, 10) and he
or she is facing due east which would be 90 degrees according to the
way I have setup the trig calculations for you. You would then pass
those functions the angle or direction the player character is facing,
the current coordinates, and the velocity or rate of speed you want to
move. That would look like this in code.

double player_angle = 90;
double player_x = 10;
double player_z = 10;

// Calculate the next x and z coordinates for the player
player_x = GetX(player_angle, player_x, 1.0);
player_z = GetZ)player_angle, player_z, 1.0);

In this case you should wind up at (11, 10) if my mental calculations
are correct. At any rate,  once you know where the player character
will be you can use it not only to get the exact coordinates of
his/her new position, but can use it to determine if it ran into
walls, doors,  and other objects that inhabit your game world.

Cheers!

On 7/29/13, john <jpcarnemo...@comcast.net> wrote:
> I understand most of these; could you explain the point of getX,
> getY, and getZ?
> 
> Thanks,
> John.

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to