Moving a 3d object at a speed slower than .6

Started by phodiS, June 20, 2020, 02:04:24

Previous topic - Next topic

phodiS

I have a 3d terrain, with an object that can move around on it following the height; works great... but it's going way to fast.... If I change the speed of the object
to anything less than .6  it simply wont move. Is there a way to do this?.... I'm hoping for a speed of say .2, which I ~think would look more to scale.

blinkok


phodiS


blinkok

If you're not using physics then i'm pretty sure your using integers somewhere and it's rounding to 0

peteswansen

are you using collision mode with the terrain or just placing it above the terrain Y height?... also what is the X and Z dimension of the terrain?

Qube

Quote from: blinkok on June 20, 2020, 05:54:22
If you're not using physics then i'm pretty sure your using integers somewhere and it's rounding to 0
That'd be my guess. Floats and delta time are a good base to start with for movement.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Steve Elliott

Quote
If I change the speed of the object to anything less than .6  it simply wont move.

That only happens when movement becomes set to 0.0 for a frame.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

phodiS

I am not doing collisions, I just have my character hovering a very small amount (.2) above the height-map. I might just try using physics and see how that goes. And yes I think it must be rounding the speed up to 1 as if I set the speed to .5 he won't move at all. I might scale the map down as well as it is gigantic with 1000+ trees. Al fun and games! :)