Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
0 registered members (), 984 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
movement around moving planets/platforms #330098
06/25/10 18:52
06/25/10 18:52
Joined: Aug 2003
Posts: 127
Berlin, Germany
C
CHaP Offline OP
Member
CHaP  Offline OP
Member
C

Joined: Aug 2003
Posts: 127
Berlin, Germany
Hey!

How can I realize the player movement around a platform/planet, they moves (pan/tilt) as well?
(A player movement like in 'Populous - The Beginning', you know?)

I have already tried:

Code:
while(1)
{
	ENTITY* eIsland = ptr_for_handle(my.skill1);
	my.x = (eIsland.x - cos(eIsland.pan) * cos(eIsland.tilt + 90) * 50);
	my.y = (eIsland.y - sin(eIsland.pan) * cos(eIsland.tilt + 90) * 50);
	my.z = (eIsland.z + sin(eIsland.tilt + 90) * 50);
	var varDistance = c_trace(my.x,vector(my.x,my.y,my.z - 100),IGNORE_ME | USE_POLYGON);
	my.skill10 += (key_t - key_g) * time_step;
	my.skill11 += (key_f - key_h) * time_step;
	my.skill12 = -varDistance;
	my.x += my.skill10;
	my.y += my.skill11;
	my.z += my.skill12;
	my.pan -= (key_r - key_z) * 5 * time_step;
	wait(1);
}



^^ In this case, the player will move exactly with the platform/planet if they moves but his own pan direction is going to lose.


And this:

Code:
ENTITY* eIsland = ptr_for_handle(my.skill1);
my.x = (eIsland.x - cos(eIsland.pan) * cos(eIsland.tilt + 90) * 50);
my.y = (eIsland.y - sin(eIsland.pan) * cos(eIsland.tilt + 90) * 50);
my.z = (eIsland.z + sin(eIsland.tilt + 90) * 50);
while(1)
{
	var varDistance = c_trace(my.x,vector(my.x,my.y,my.z - 100),IGNORE_ME | USE_POLYGON);
	my.skill10 = (key_t - key_g) * time_step;
	my.skill11 = (key_f - key_h) * time_step;
	my.skill12 = -varDistance;
	my.pan -= (key_r - key_z) * 5 * time_step;
	c_move(my,vector(my.skill10,my.skill11,my.skill12),nullvector,IGNORE_MODELS);
	wait(1);
}



^^ There works the pan direction fine but the player will not moved to the right position of platform/planet.

And, let alone of the including of the normal adjustment...

So, any ideas?

Re: movement around moving planets/platforms [Re: CHaP] #330159
06/26/10 00:11
06/26/10 00:11
Joined: Aug 2003
Posts: 127
Berlin, Germany
C
CHaP Offline OP
Member
CHaP  Offline OP
Member
C

Joined: Aug 2003
Posts: 127
Berlin, Germany
Well, bad english or to heavy? Maybe both of them?

Anyway! Here is a picture that will show my problem.



Re: movement around moving planets/platforms [Re: CHaP] #330221
06/26/10 12:00
06/26/10 12:00
Joined: Aug 2003
Posts: 127
Berlin, Germany
C
CHaP Offline OP
Member
CHaP  Offline OP
Member
C

Joined: Aug 2003
Posts: 127
Berlin, Germany
Right!

On this PAGE is exactly what I want to do. And these used mechanics agree with my thoughts.

But, how the hell will it work if the planetoids are moving?!

Re: movement around moving planets/platforms [Re: CHaP] #330223
06/26/10 12:06
06/26/10 12:06
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Hey man, use the "EDIT" button.

Re: movement around moving planets/platforms [Re: CHaP] #330226
06/26/10 12:09
06/26/10 12:09
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany

Re: movement around moving planets/platforms [Re: Pappenheimer] #330243
06/26/10 12:51
06/26/10 12:51
Joined: Aug 2003
Posts: 127
Berlin, Germany
C
CHaP Offline OP
Member
CHaP  Offline OP
Member
C

Joined: Aug 2003
Posts: 127
Berlin, Germany
The EDIT button. Well, sry!

Erm...yes it can help me. Thx Pappenheimer!
But the normal adjustment is not the main problem.

I need a solution to add the right movement from the platform to the player.

Re: movement around moving planets/platforms [Re: CHaP] #330296
06/26/10 17:47
06/26/10 17:47
Joined: Jan 2002
Posts: 300
Usa
Rich Offline
Senior Member
Rich  Offline
Senior Member

Joined: Jan 2002
Posts: 300
Usa
How about: When the player is on the platform, the player stores a pointer to himself in one of the platform's skills.

Then in the platform's action, it displaces the player (using the pointer) to a position far away, performs it's own movement, then brings the player back to his original position plus distance the platform moved that frame. And finally, the platform's action clears the skill, it would be set again by the player's action if he is still standing on it.

Just a concept.


A8 com / A7 free

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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