Keep objects from snapping to terrain when moving?

Volusia

Member
I have placed an object on the ground plane. I then raise it up a few meters. Now if I move the object it will "snap" back to the terrain. Is there a way to keep this from happening?
 
That isn't supposed to happen, at least not with any simple scenery assets.

Is it happening with all objects, or just one? Can you give the kuid number of an object that behaves in this way? If it is one that is on the DLS, or built-in to TRS19, we can download and check it.
 
This occurs with any simple scenery asset.

Just to be clear on what I'm seeing:

Let's say I add a boulder asset to the ground plane. I then use the height tool to raise it up a meter or so. If I move it over any uneven terrain it will not maintain the height I raised it to. It will "snap" back to the surface of the terrain.
 
I see. I just checked my own TRS19 and confirmed that if I raise an object 1m into the air then move it, it maintains its 1m elevation relative to whatever the terrain height is. I could not find any general setting that would control or cancel that behaviour. This leads me to think there is something corrupted in your copy of Trainz.

All I can suggest is in the first instance, do an extended database repair and see if that rectifies things.

Failing that, re-install Trainz, but before you do that drastic step, it might pay to wait and see if anyone else here has a better solution.
 
That's normal and annoying Trainz behavior that has occurred forever. If you offset an object 20 meters from the ground, this is in reality 20 meters from zero. You then move the same asset to another place on the map that has a 40 meter hill. The asset is still at 20 meters from zero so when it hits the 40 meter hill it ends up being buried.

It would be nice if the offset isn't from zero but instead is from the terrain surface. In that case it would be object offset from zero+the terrain height. (Yikes it's math!).

But objects shouldn't drop back to zero if they are in the same location. In fact we always find things that are floating rather unexpectedly while troubleshooting and QC'ing a route.
 
That's normal and annoying Trainz behavior that has occurred forever. If you offset an object 20 meters from the ground, this is in reality 20 meters from zero. You then move the same asset to another place on the map that has a 40 meter hill. The asset is still at 20 meters from zero so when it hits the 40 meter hill it ends up being buried.

Are you sure John? That's definitely not what I see. Scenery objects maintain their height offset relative to the terrain surface. Things can be different with tracks and splines, but regular scenery objects don't act as you describe. At least in my copy of TRS19.

One thing we agree on though is that scenery objects should not "snap" back to zero offset just because you move them.
 
I always remember objects getting buried into hills. You certainly need some origin for locating an object. 0 altitude seems reasonable to me. Slightly off topic, but I output some terrain for the Rocky Mountains from Transdem. Some was above 3000 meters. When you try to move a track, an extremely deep trench appears, and the track plunges down into it. I assume it is either plunging to 0 or 3000 meters.
 
Seeing is believing. Keep your eye on the coconut palm on the right of the track. It's elevated by +3.0m, so its ground shadow does not meet the base of the tree.

FvxvWAi.jpg



Moving the tree left to the steep embankment, you can see it does not get buried, but remains elevated relative to the terrain.

vkUxhR2.jpg


If your scenery objects don't behave like this, then something's wrong.
 
Trees are supposed to do that. Most scenery like rocks, boulders, and houses, for example, can/will sink into the ground. That's why there is a height function in Surveyor. Probably a tag in config, or from the class it inherits from.
 
Trees are supposed to do that. Most scenery like rocks, boulders, and houses, for example, can/will sink into the ground. That's why there is a height function in Surveyor. Probably a tag in config, or from the class it inherits from.

The only "sinking" effect you might be thinking of is when objects are so large (horizontally) that one side disappears into a hillside while the other side is left hanging in the air. That's not really sinking because the object's origin point still sits exactly on the ground at that location (or follows the terrain at a fixed offset if a height adjustment has been applied).

Trees are not fundamentally different from other instances of Kind scenery like rocks, boulders etc., they are just thinner than most, so you don't notice the ground intersection effect as much. In the shots below, you can clearly see the levitated boulder still levitating after it moves to the cliff face. If it had been twice as wide, then some of it would have intersected the ground. Of course, exactly the same would happen to a tree if its trunk was thick enough.

SEMuZeX.jpg


xeGX2aq.jpg



There is a config tag called "snapgrid" which snaps an object to one of the ground grid point locations, but does not change its height relative to the ground. There is another tag called "floating" which applies a permanent vertical height offset to an object. Both of these tags are hardly ever used, but in any case, neither explains the OP's problem of objects spontaneously losing their height adjustment when simply moved.



.
 
Last edited:
Back
Top