Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 04/25/26 16:09
Z9 getting Error 058
by jcl. 04/24/26 17:48
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, Grant), 3,390 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
panning through walls #184971
02/22/08 00:25
02/22/08 00:25
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline OP
User
Ottawa  Offline OP
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

I have this code

Code:
	_bouge_o_n = c_move (enTete,vector(10 * (key_w - key_s) * time_step, 6 * (key_a - key_d) * time_step, 0),
nullvector, IGNORE_MAPS | ACTIVATE_TRIGGER | IGNORE_CONTENT | USE_BOX | GLIDE | IGNORE_PASSABLE); //



it works very well if I move forward or backward.

But if I pan.
Code:
		camera.pan -= 5 * mouse_force.x * time_step; // rotate the camera around by moving the mouse



I pan through the wall and through enttities. I sometimes get stuck.

Anyway to stop this.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: panning through walls [Re: Ottawa] #184972
02/22/08 00:51
02/22/08 00:51
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
You have to use c_rotate to have collisions while rotating.


I like good 'views' because they have no 'strings' attached..
Re: panning through walls [Re: zazang] #184973
02/23/08 23:57
02/23/08 23:57
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline OP
User
Ottawa  Offline OP
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi zazang!

I used c_rotate as you suggested...Thanks

Here's the code :

Code:
	// move the player using the "W", "S", "A" and "D" keys; "10" = movement speed, "6" = strafing speed
_bouge_o_n = c_move (enTete,vector(10 * (key_w - key_s) * time_step, 6 * (key_a - key_d) * time_step, 0),
nullvector, IGNORE_MAPS | ACTIVATE_TRIGGER | IGNORE_CONTENT | USE_BOX | GLIDE | IGNORE_PASSABLE);
vec_set (camera.x, enTete.x);

enTete.pan -= 5 * mouse_force.x * time_step;
vec_diff(vec_tempmi,enTete.pan,camera.pan);
c_rotate (enTete,vec_tempmi , IGNORE_YOU | IGNORE_PASSABLE | USE_AXIS );

vec_set (camera.pan, enTete.pan );// the camera and the entity have the same pan angle
enTete.z = 8;// keep the entity close to the floor...it was mouving up and down
wait (1*time_step);



Problem solved at this time.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C

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

Gamestudio download | 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