Jump to content
Deadeye_Rob

Rotating Objects

Recommended Posts

Hi guys! Quick question here!

If it's at all possible, how can I make an object such as a Cogwheel rotate indefinitely?

 

Its for a little project I'm working on. Simple answers/screenshots if possible please! I'm not too sharp on the editor!

Thanks!

Rob

Share this post


Link to post
Share on other sites

Hi @Deadeye_Rob

If it is possible to do it with small rotations and a loop, but it is better to wait for the new update, you can do it in a simple way and without affecting the performance so much.?

Share this post


Link to post
Share on other sites

Put down a time trigger, set it to -1 repeats (infinite). Then setup a script to "on trigger" "set position (or orientation)" and then have to update the numbers as you wish. 

Share this post


Link to post
Share on other sites

@Spyler.X do you mean the new "move object? It won't be needed time trigger anymore and set position every second? You know how it will work?

Thanks. 

Share this post


Link to post
Share on other sites
32 minutes ago, jchob said:

@Spyler.X do you mean the new "move object? It won't be needed time trigger anymore and set position every second? You know how it will work?

Thanks. 

Here explains a little and you have an image with the new logic

in any case the time trigger for animations gives many problems should use loops with an instruction, it is safer

Edited by Spyler.X

Share this post


Link to post
Share on other sites
14 hours ago, Spyler.X said:

in any case the time trigger for animations gives many problems should use loops with an instruction, it is safer

Iv never had problems with time triggers, what have you encountered?

Share this post


Link to post
Share on other sites
1 hour ago, Oliver Hope said:

Iv never had problems with time triggers, what have you encountered? 

it is not a problem in itself, simply if you have a time repeater every 0.03 sec to get a fluid movement, any delay in the server will produce a small loss of information in the repeater, a solution is to restart the repeater from time to time to avoid the mismatch but the instruction works better because it constantly restarts independently if it has lost a cycle.

and performance problems with repeaters for a multiplayer map are well known

 

Share this post


Link to post
Share on other sites
27 minutes ago, Spyler.X said:

it is not a problem in itself, simply if you have a time repeater every 0.03 sec to get a fluid movement, any delay in the server will produce a small loss of information in the repeater, a solution is to restart the repeater from time to time to avoid the mismatch but the instruction works better because it constantly restarts independently if it has lost a cycle.

and performance problems with repeaters for a multiplayer map are well known

 

Oh ok, however I remember reading somewhere that the wait block uses a time trigger so it still going to cause problems on MP

Share this post


Link to post
Share on other sites

Basically in programming, every movement of an object, depends on delta time. This means, "something in background" is checking everything  every second. For example, in a game there is a "event handler", that is always listening if a player presses any button to move. That event is linked to another "listener" that calculates the movement (check its position and place it + vector_3 every second.

Maybe this sounds confusing, but it's like how ylands handle it. It sure needs more improvement, tho

Share this post


Link to post
Share on other sites

Hi, using time triggers with a small time delay is not the only problem. Probably bigger issue is discribed in http://zerosalife.github.io/blog/2014/08/02/static-and-dynamic-colliders-in-unity/ . Anything what is not animal, player or vehicle is considered as static object. It means that Unity (development environment we use) can precount many things so collision detection is quick (deciding what you hit, walking on the terrain/floor, checking what impact will have explosion). It has a catch. When you move "static" object then it has to precount everything from the scratch and that is the problem.

In 0.13 you will be able to mark anything as "animated"(dynamic). Even if you do not want to use our animators/new scripting tiles for your moving objects you can benefit from marking them as "animated".

Share this post


Link to post
Share on other sites
5 minutes ago, Houp said:

Hi, using time triggers with a small time delay is not the only problem. Probably bigger issue is discribed in http://zerosalife.github.io/blog/2014/08/02/static-and-dynamic-colliders-in-unity/ . Anything what is not animal, player or vehicle is considered as static object. It means that Unity (development environment we use) can precount many things so collision detection is quick (deciding what you hit, walking on the terrain/floor, checking what impact will have explosion). It has a catch. When you move "static" object then it has to precount everything from the scratch and that is the problem.

In 0.13 you will be able to mark anything as "animated"(dynamic). Even if you do not want to use our animators/new scripting tiles for your moving objects you can benefit from marking them as "animated".

If devs are adding that "feature" I guess it's for game benefits. Aah, dealing with Unity colliders can be a pain. Maybe I'm one of the few who understands devs and players position. I know how game development can be hard, but I also know how players feel ?

Let's wait and see what comes up, eheh

We are still waiting for the "early next week update" ?

Thanks

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×