Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
distance using ray; not so good
Topic Started: Nov 29 2010, 09:11 AM (134 Views)
DJ-Habana
C# King
[ *  *  *  *  *  * ]
ok for my bullets I am using ray to check for colision with anything infront of him but sometimes it misses depending where I stand and shoot
this my code
Code:
 

Move(rotx,roty,6);


dist=CheckRayIntersection(all,x,y,z,rotx,roty,all);
if dist > -1 {ObjHit = GetIntersectedObject();}else{ObjHit = noone}

if ObjHit != noone
{
if dist < 1 {
if ObjHit.type = 'Char' {global.myhealth -= floor(random_range(5,20));instance_destroy();camera.hit=true;camera.alarm[1]=10}
else
{instance_destroy();}

}
}


Step();
Posted Image


Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply