Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, TipmyPip, RealSerious3D), 892 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Effective floor placement for movement #442374
06/19/14 19:53
06/19/14 19:53
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
I'm using this code for gravity/floor placement of my first person movement code. I keep getting stuck in the ceiling when the floor and ceiling slope together and meet like this shape: <

Code:
dist_down = c_trace(my.x,vector(my.x,my.y,my.z-5000),IGNORE_ME | IGNORE_PASSABLE | USE_BOX );
      //vec_set(normalplane,hit.nx);
      z_spot = hit.z;
      if(my.z > z_spot + 16)
      {
      	zforce -= time_step * accel;
      	accel += time_step *0.25;
      }
      else
      {
      	zforce = 0;
      	accel = 0;
      }



Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Effective floor placement for movement [Re: Stansmedia] #442377
06/19/14 22:43
06/19/14 22:43
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
use c_move and put in a negative z movement, the built in system is a lot better at this then script can do.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: Effective floor placement for movement [Re: FoxHound] #442379
06/20/14 06:20
06/20/14 06:20
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
When I walk up slopes, it bottoms out anyway. I had the script keeping the player at a certain level above the trace to stop from bottoming out, but this caused gliding up near vertical slopes - not to mention, getting jammed into ceilings... which is still happening.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Effective floor placement for movement [Re: Stansmedia] #442396
06/20/14 17:52
06/20/14 17:52
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
An idea is: Trace above. If the trace hits then the player could duck.. All the while following the gravity algorithm. This combined with good collision detection should prevent the camera from "looking through" meshes.

Gravity is covered in the AUMS I think its in the 70's laugh

Last edited by DLively; 06/20/14 17:52.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Effective floor placement for movement [Re: DLively] #442397
06/20/14 18:19
06/20/14 18:19
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
Looking through mesh isn't the problem. It's physically getting stuck.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Effective floor placement for movement [Re: Stansmedia] #442400
06/20/14 18:55
06/20/14 18:55
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
Use glide with C_move and you won't get stuck going up hills


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: Effective floor placement for movement [Re: Stansmedia] #442425
06/21/14 13:42
06/21/14 13:42
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Quote:

Looking through mesh isn't the problem. It's physically getting stuck.

Well, the AUMS are still a good place for you to be looking wink As mentioned its covered within.

Btw, here it is. Took me all of 3 minutes to find it xD


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com

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