Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bullet Trajectory #340424
09/04/10 02:59
09/04/10 02:59
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Hi,

I have a problem whit bullet trajectory in a 3rd person camera project.The bullet start from a vertex of my gun but how to tell it to go where i want... like in the center of my screen where's the crosshair are, whitout using c_trace.. cause i want to have a visible entity for my bullet.For now the bullet seem to go straight foward where the gun point but the gun are not at the center of the sreen so the trajectory of the bullet dont fit to hit the center of the sreen regardless the distance where it hit.

For now i use a code like that..

function move_bullets()
{
VECTOR bullet_speed;
my.skill30 = 1;
my.emask |= (ENABLE_IMPACT | ENABLE_ENTITY | ENABLE_BLOCK);
my.event = remove_bullets;
my.pan = camera.pan;
my.tilt = camera.tilt;
bullet_speed.x = 100 * time_step;
bullet_speed.y = 0;
bullet_speed.z = 0;
while (my)
{
c_move (my, bullet_speed, nullvector, IGNORE_PASSABLE);
wait (1);
}
}




Last edited by Altarius; 09/04/10 03:03.
Re: Bullet Trajectory [Re: Altarius] #340439
09/04/10 12:21
09/04/10 12:21
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Why don't you want to use c_trace? first trace once where the bullet needs to go, then create the bullet and let it shoot towards the target. As far as I can think of there is little other possibility as the angle of the bullet changes with the length of the trajectory.

Last edited by Joozey; 09/04/10 12:22.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Bullet Trajectory [Re: Joozey] #340448
09/04/10 13:16
09/04/10 13:16
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
C_trace give some weird thing... what if i need to shoot at a moving target and i need to shoot my bullet a little before it so c-trace hit far away and the trajectory are wrong...

Re: Bullet Trajectory [Re: Altarius] #340451
09/04/10 13:39
09/04/10 13:39
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
you can use c_trce, and the you can use the vector hit.x,hit.y,hit.z, to tell the bullet, where he has to go.


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de

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