Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Q3 jumppad

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
lukas2288 Joined: 14 Jun 2009 Posts: 42 |

Posted: Fri Jun 19, 2009 4:57 am Post subject: Q3 jumppad |

Hello qc guys, when you load a q3 map in darkplaces with jumppads (q3dm17 for example)you can move on air but in q3 engine you cannot.Is there some way how to fix it in quake1 trigger_push?

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Fri Jun 19, 2009 6:50 am Post subject: |

set the player's teleport_time field. This field is meant to prevent the player from changing their velocity for a period of time. But you will need to calculate when the player will land. Actually, in Q3 you can change your velocity. The issue is that in Q1 if you try accelerating contrary to your current velocity you stop very fast, while in q3 you keep your speed but slowly change direction.
_________________
What's a signature?

Back to top |

SpannA Joined: 12 Jan 2009 Posts: 16 Location: Auckland |

Posted: Wed Jul 01, 2009 1:51 am Post subject: try this |

This is my Quake3 mod it has jumppads in it http://forums.inside3d.com/viewtopic.php?t=1384 and the source is with it . good luck

Back to top |

Scrama Joined: 28 Aug 2009 Posts: 20 Location: Siberia, Omsk |

Posted: Fri Aug 28, 2009 6:37 am Post subject: |

I try to improve trigger_push to save direction of player movement. Original code (triggers.qc\trigger_push_touch) looks like

Code:
other.velocity = self.speed * self.movedir * 10;

I've added 1/10 of old entity velocity

Code:
other.velocity = other.velocity * 0.1 + self.speed * self.movedir * 10;

but in game it kicks me up only for a half of height. My 'debug' code now looks like

Code:
// scrama: save direction bprint("velocity "); bprint(vtos(other.velocity)); vel1 = other.velocity * 0.1; bprint(" -> ");
bprint(vtos(vel1));
vel2 = self.speed * self.movedir * 10;
bprint(" \n ");
bprint(vtos(vel2));
other.velocity = vel1 + vel2;
bprint(" \nresults ");
bprint(vtos(other.velocity));
bprint("\n");

And all vectors are fine:

Quote:
velocity '320.0 23.1 0.0' -> '32.0 2.3 0.0' '0.0 0.0 1070' results '32.0 2.3 1070'

WTF and what to do?
Also, I've changed SetMoveDir as

Code:
void() SetMovedir = { local vector org; local entity t; if ((self.classname == "trigger_push")&&(self.target))
{
t = find (world, targetname, self.target);
if (t)
{
org = self.mins + self.size * 0.5;
org = normalize(t.origin - org);
self.movedir = org;
return;
}
}
if (self.angles == '0 -1 0')
self.movedir = '0 0 1';
else if (self.angles == '0 -2 0')
self.movedir = '0 0 -1';
else
{
makevectors (self.angles);
self.movedir = v_forward;
}
self.angles = '0 0 0';
};

But it works only in new maps, of couse...

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Fri Aug 28, 2009 7:25 am Post subject: |

Q3 jumppads are coded such that the player will stike the targetted point. This means that you need to consider gravity and its affect over the duration needed to get from a to b. I don't know the required formula, but that's what your code lacks.
_________________
What's a signature?

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group