Objects set to reset player don't always reset player #1483
Comments
|
You can give a link to where the track can be downloaded? |
|
The track in the video can be downloaded here. The plane rises at slightly over 2:00. Note however that the plane doesn't rise smoothly in this track; it just teleports from below the track to slightly above. I didn't save the track where the plane rises gradually, as it was only a test. It should be pretty simple to make a test with two planes where one is set to reset the kart and rise up, though. |
|
Can you describe the problem a bit better? Which part of the track should reset but doesn't? Also, sharing the blend file would help |
|
At 2 minutes into the game, a plane is supposed to pop up to 0.1 meters above the ground from 0.1 meters below. This plane is set to reset the player in both object and material settings. The problem is that nothing happens. To find out what was happening, I took another plane, which started slightly above the track and rose to two meters above from 1:15 to 2:00, and set it to reset the player. When I tested the modified map, I found that instead of resetting the player's kart, the plane would just push it up. I've actually just uploaded the source files of this track for samuncle, so you can download them here. The plane that pops from slightly below to slightly above the track is in layer 10 ("0" key) of both 1_32.blend and 1_20.blend, and you can recreate the test I did with the rising plane by changing one of the objects on either layer 6 ("6" key) or 16 ("alt-6") of 1_20.blend to reset the player. Note that you'll probably have to copy "temple 14_8_21/assets/library/stklib_lowAnimGrass_a" into "stk-assets/library" for the track to work. You might also have to extract the entire archive, instead of just the .blend files. |
|
I think the issue is that we have two kind of resets: one that is triggered on collision of the chassis with an object, the second one on driving on a specific terrain (i.e. texture). In your case, with the plane slowly raising, there won't be a collision with the plane (the kart chassis hovers over the terrain, it never touches it). To make your idea work you need to set the material of the plane to trigger a reset (see the SuperTuxKart image properties, interactions: reset (on drive)). I couldn't test it (your latest version crash stk for me atm, but that's an issue with my graphics card), so please let us know if this works as expected. |
|
I checked the file, and the plane was set to both reset on drive in the material properties and reset on collision in object properties. It wasn't set to reset on collision in material properties though, so I enabled that. With it enabled, the behaviour is almost exactly the same (i.e. the kart doesn't get rescued as it should), with only one small exception. Before, crashing into the barrier at the edge of the track had a small chance of causing a rescue. Now, it happens every time. |
|
Could you upload the exported track and the modified .blend? I have the package you mentioned above, so I guess I have all textures etc. I just want to make sure we are talking about the same things ;) (e.g. I had an older exporter, and your loxXYZ changes were exported as scaleXYZ, which is not supported from STK). |
|
Just as a quick update: I think I have found the problem (the raycast detecting the terrain is only done against the main track mesh, not against all physical bodies like your plane. The wheels on the other hand test collision against anything). Fixing this is not entirely trivial, since only the main track mesh (atm) stores the texture information, not a physical object. |
|
I have just pushed a first version to improve the handling of driving on physical bodies (68e45db). I'll do some more refactoring, and have to update the exporter. But if you want to test it now:
<object id="waterdeath" type="animation" xyz="0.00 -0.10 0.00" hpr="0.0 -0.0 0.0"
scale="1.00 1.00 1.00" interaction="static" shape="exact" model="waterdeath.b3d"
reset="y" skeletal-animation="false" driveable="yes">
<curve channel="LocY" interpolation="linear" extend="cyclic">
...I'll update this ticket as I get more work done, but feedback would be appreciated. |
|
I added a new 'driveable' property to the exporter in r15569. Please let me know how you go. |
|
My build failed with the following message(s): This actually happens with all revisions less than a couple days old. Any idea what's causing it? I think 44d50aa is the most revision I tried that worked. Thanks. |
|
This is only a warning message (which I get as well), it does not cause the error message. Could you paste the actual error message (don't run make with -j, then the last message should be the actual error). |
|
I think this is it: |
|
I assume you have libglew 1.9 (or older) installed? You need libglew 1.10 to compile STK now :( |
|
Aw. I don't suppose there's any way to get that on Fedora 20 without manually installing it? Anyway, I noticed that the example scene.xml you gave uses drivable="yes", while the exporter uses drivable="true". |
|
For my OpenSuse I had to find a different repository, from which I could install 1.10. I don't know much about fedora, but googling for 'fedora glew 1.10' returned (among others): https://pkgs.fedoraproject.org/repo/pkgs/glew/glew-1.10.0.tgz/ I hope some other fedora user here might be able to provide more details. |
|
Oh, and I forgot to mention: "true" or "yes" in XML files is both accepted by STK. |
|
Looking at the second link, and apps.fedora.org, it seems that the libglew1.10 package is only for Fedora 21, which is slated to be released in December. I'll make a thread on the forums asking if there's some other repository I can install to get it on Fedora 20. Thanks for implementing this and helping me compile the game. Unless the scale not working is a big issue, then this ticket can probably be closed. |
I made a track in which a plane was supposed to rise up through the ground and reset the player. It didn't work. Instead, the player was just pushed upwards by the plane.
It seems that there has to be some kind of a collision for the rescue to happen, as show in this video (which is not of the test I described).
EDIT: Tested on 2a473a5, due to everything later being broken for me.
The text was updated successfully, but these errors were encountered: