Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 05:41
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
2 registered members (AbrahamR, AndrewAMD), 1,278 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Classic problem: character floats #171898
12/09/07 07:45
12/09/07 07:45
Joined: Dec 2003
Posts: 179
Chameleon_Man Offline OP
Member
Chameleon_Man  Offline OP
Member

Joined: Dec 2003
Posts: 179
Hi. My character is floating above the ground when I don't want him to be. Here's my code...

move_mode = ignore_you + activate_trigger + glide;
ent_move(vector(x_momentum,0,0),vector(0,0,z_momentum));

I notice that when I run into walls and other characters, theres a gap, almost like theres a large invisible box around my character. Any advice? Thanks!

Re: Classic problem: character floats [Re: Chameleon_Man] #171899
12/09/07 13:14
12/09/07 13:14
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
It seems you only have x and y vectors in there and no z vector which is what gravity relies on.(not familiar with the method)
Then again, you have a double vector statement rather than one.

Never liked that sort of gravity control as it takes too much to balance forces I find.

Try vector(x_momentum, 0,z_momentum)



Last edited by Nems; 12/09/07 13:18.
Re: Classic problem: character floats [Re: Nems] #171900
12/09/07 17:56
12/09/07 17:56
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
You may have a large invisible box around him. Hit F11 twice to check the size of the bounding box.

Re: Classic problem: character floats [Re: Nems] #171901
12/09/07 18:13
12/09/07 18:13
Joined: Dec 2003
Posts: 179
Chameleon_Man Offline OP
Member
Chameleon_Man  Offline OP
Member

Joined: Dec 2003
Posts: 179
No,thanks though, but that's not the problem, the way ent_move works is ent_move(relative,universal). Gravity works as a universal force, while the players movement works as a relative force (walk forwards or backwards).

Jazz. The box feature must be new, it's so cool. Anyways, the box is placed under my character, and it's in the shape of a cube. Is there anyway for my to adjust the dimensions and position of the box? Thanks!

Or are there any other suggest for gravity?

Last edited by Chameleon_Man; 12/09/07 18:31.
Re: Classic problem: character floats [Re: Chameleon_Man] #171902
12/09/07 18:55
12/09/07 18:55
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Place c_setminmax(me); in the character's action.

Re: Classic problem: character floats [Re: JazzDude] #171903
12/09/07 20:11
12/09/07 20:11
Joined: Dec 2003
Posts: 179
Chameleon_Man Offline OP
Member
Chameleon_Man  Offline OP
Member

Joined: Dec 2003
Posts: 179
Edit: Works great now, THANKS!

Last edited by Chameleon_Man; 12/09/07 20:14.
Re: Classic problem: character floats [Re: Chameleon_Man] #171904
12/10/07 01:41
12/10/07 01:41
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Ok, thanks for the pointer and good one JazzDude


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