guided jumps in tracks

guided jumps in tracks

Postby sommejul » 15 Sep 2019, 15:39

Hi,
can anyone tell me how to make a track in blender where you have guided jumps such as in other tracks like cornfield crossing where you jump into a barn.

thanks in advance,
sommejul
sommejul
 
Posts: 14
Joined: 02 Sep 2019, 13:08

Re: guided jumps in tracks

Postby tempAnon093 » 16 Sep 2019, 03:31

Those are called Cannons in the documentation.
https://supertuxkart.net/Physics#Cannons
Read though that page to learn how to make them and feel free to post again if you need more help. It could also be useful to download the Cornfield Crossing track from the Media repo if you want to see how it was created.

(PS: here's a fun little feature I made using cannons: YouTube video)
tempAnon093
 
Posts: 119
Joined: 02 Feb 2019, 12:09

Re: guided jumps in tracks

Postby jin » 18 Sep 2019, 01:50

The teleport could be very useful and creates new possibilities for track making!!! @tempAnon093, is it possible to make one straight track and teleport back to the start? So each lap will not be a closed loop.
jin
 
Posts: 18
Joined: 29 May 2013, 17:53

Re: guided jumps in tracks

Postby deve » 18 Sep 2019, 07:26

You can write script file. There is teleport() function for kart. And you can execute it as interaction to an object (in theory, untested). But I think cannon would work better (visually more smooth than teleport).
deve
 
Posts: 260
Joined: 23 Jan 2014, 13:45

Re: guided jumps in tracks

Postby tempAnon093 » 18 Sep 2019, 09:25

jin {l Wrote}:The teleport could be very useful and creates new possibilities for track making!!! @tempAnon093, is it possible to make one straight track and teleport back to the start? So each lap will not be a closed loop.


deve {l Wrote}:You can write script file. There is teleport() function for kart. And you can execute it as interaction to an object (in theory, untested). But I think cannon would work better (visually more smooth than teleport).

I tried this with cannons before I started learning how to script, so I haven't tried teleport(). When I saw that function, I knew I should have tried that sooner!

I know with cannons you can use it to teleport long distances like you say, although I think if you want it to be instant (that is, extremely, extremely fast; no problems if you just want 'less than a second') then you can only go so far because I've seen crazy glitching once I take the speed somewhere above 10000 or so. That would be a great use for a texture collision which calls teleport() instead, teleport shouldn't have that issue.
Also, I don't know if teleport() does this or not, but cannons also swivel the camera to follow the kart once it arrives, so it's much smoother to make it finish going the same direction as it starts (eg. straight line cannon).

You can make a straight track and teleport back to the start using either cannons or teleport(), absolutely! The harder part is doing that in a way that is smooth to drive through (if that matters to you).
tempAnon093
 
Posts: 119
Joined: 02 Feb 2019, 12:09

Re: guided jumps in tracks

Postby deve » 18 Sep 2019, 10:07

I'm not sure if it's documented somewhere, all functions are available in:
https://github.com/supertuxkart/stk-cod ... _track.cpp
https://github.com/supertuxkart/stk-cod ... t_kart.cpp
and some other files in this directory. You can search for "engine->Register"

There is not much working examples, but you can see eg. overworld, tutorial or ScriptingPlayground in wip-tracks.
deve
 
Posts: 260
Joined: 23 Jan 2014, 13:45

Re: guided jumps in tracks

Postby deve » 18 Sep 2019, 23:12

I added teleportExact() function, because teleport() didn't work good for me. But you need current git STK for it. And in attachment you can see portal example. Maybe it would be even better when using action trigger and ghost objects.
Attachments
portal.zip
(83.97 KiB) Downloaded 9 times
deve
 
Posts: 260
Joined: 23 Jan 2014, 13:45

Re: guided jumps in tracks

Postby tempAnon093 » 19 Sep 2019, 02:49

deve {l Wrote}:I added teleportExact() function, because teleport() didn't work good for me. But you need current git STK for it. And in attachment you can see portal example. Maybe it would be even better when using action trigger and ghost objects.

Speaking of action triggers, I sent an email to dev list regarding an issue with action triggers kart_id when you have more than one kart.
I should make a git issue about it later today.
tempAnon093
 
Posts: 119
Joined: 02 Feb 2019, 12:09

Who is online

Users browsing this forum: No registered users and 1 guest