Page MenuHomePhabricator

Please add an engine operation for moving objects along a path / in a specific direction
New, WishlistPublic

Description

Currently the only way (that I'm aware of) to "move" an oject is by using a setpos loop. This, however, can get rather performance-heavy, especially when many objects are "moved" at the same time.

Having a more performant in-engine solution for moving objects, e.g. in a specifig direction, would easy some things for us scripters and modmakers.
It'd also open up new possibilities.

Details

Legacy ID
7660723
Severity
None
Resolution
Open
Reproducibility
Always
Category
Feature Request
Steps To Reproduce

-

Additional Information

As always, I'll include my first child.

Event Timeline

Laxemann edited Steps To Reproduce. (Show Details)Oct 14 2014, 8:14 PM
Laxemann edited Additional Information. (Show Details)
Laxemann set Category to Feature Request.
Laxemann set Reproducibility to Always.
Laxemann set Severity to None.
Laxemann set Resolution to Open.
Laxemann set Legacy ID to 7660723.May 7 2016, 7:36 PM

There is setVelocityTransformation for for these kind of things

Hm, I've never been into vectors (shame on me and nothing I couldn't learn, right right) but it seems as if this is pretty much the same as using a setPos loop - just with more options. Which is exactly what I'm trying to avoid.

A short explanation:
I'm working on a mod that simulates reverb created by firing a gun moving through the environment, based on terrain. In order to get the reverbs (using a #particlesource as a dummyobject) to move I'm using a setPos loop that uses a 0.2s sleep between each step to save performance.
But oh well, using so many setPos loops really has a noticable impact on the framerate.
I've already written a leightweight script that deletes old dummyobjects in case there are more than fifty floating around, but it still gets laggy sometimes.

Sorry, got longer than I thought - and please correct me if I'm wrong!
Thanks for your efforts anyway, really appreciating it.

well with setVelocityTransformation, you set start position and orientation of the object, end position and orientation of the object and then you change the last param from 0 to 1 and the object will move from start to end. How smooth depends on the step you will use iterating from 0 to 1