Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: mr.ffish on November 29, 2016, 05:42:36 PM
-
I recently read that it is very expensive to translate colliders without rigidbodies. I also read that it is much better to use rigidbody.move.position rather than transform or translate. I found the "rigidbodyMovePosition"action in the ecosystem, but it only applies to the 3D rigidbody.
I understand using add force2d and set velocity2d, but I am trying to move a 2d rigidbody "forward" so that when i use LookAt2d, it will move towards the target instead of just turning towards the target while drifting off in the direction I have added force or set velocity to. When I use translate on X, it does exactly what I want, but if that method is really more expensive, then is there any way to achieve the same behavior with a rigidbody.move, over using translate?
I have been using Playmaker for a few weeks now, and I have an amazing looking retro-2d-platformer well on it's way. However, I am getting into some complex enemy movements, and I am running into some severe slow down. I am trying really hard to isolate the source, and I believe it has to do with how much I am translating my enemies.
Any help at all would be much appreciated. I have much faith in my trusty Playmaker asset, and I am sure that this is just a lack of knowledge on my part. If anyone knows any ways to improve performance with 2d physics i.e. moving rigidbodies, I would be very much appreciative.
This issue has pretty much halted my games progress entirely until I can get it fixed. I want to make sure I am using the most efficient (least expensive) methods possible so that I don't spend another two weeks programming choppy physics.
Thank you in advance.
--mr.ffish
-
Hi,
yes, I made two new actions on the Ecosystem to move and rotate 2d rb, can you give this a try?
(https://pbs.twimg.com/media/CylAPKCWgAA3q9R.jpg)
Let me know if that helps.
bye,
Jean
-
Ahhh! you are so awesome for doing this!
I am getting this error though:
Actions/Physics2D/Rigidbody2dMovePosition.cs(9,48): error CS0246: The type or namespace name `ComponentAction`1' could not be found. Are you missing a using directive or an assembly reference?
I am using unity 5. Is there something I am missing?
-
Hi,
Odd. What version of PlayMaker do you use?
Bye,
Jean
-
I am trying to figure it out, but I don't see the version anywhere in my project. I have a lot of different actions that I have accumulated over the weeks, and they all work. For some reason I just can't get these to. I reimported playmaker to see if it would work then but I am still getting the error. Is there something I can change in the code to make it work?
Please help, i am so excited to start using these new actions. According to the error, it's the "ComponentAction" that could not be found. Am I overlooking something?
Thank you for your help.
--mr.ffish
-
Ha! I updated and everything is fine now (:::
Thank you so much for your help with this. I am so excited to get back to development. This really is a great community!
--mr.ffish
-
:)
Let us know if it improved the situation!
Bye,
Jean
-
I'm also really interested to know if this improved your perf. Please post back with your findings when you get a chance :)
-
Hi,
Is there an action (or a way to improve this action) to add the options that are in the "move object" action? So the option to add a Time, speed, delay, ease type etc. to the rigid body 2d move position?
Or is there no use for those options? Maybe i have misunderstood how functionality here.
-
Hi,
sure, I'll work on that. ping early next week if I haven't done it by that time.
Bye
Jean
-
Hi,
Ok, it's on the Ecosystem, called MoveRigidbody2D.
let me know how it goes. If it works ok for you. I'll tweet about it.
Bye,
Jean
-
Hi,
Ok, it's on the Ecosystem, called MoveRigidbody2D.
let me know how it goes. If it works ok for you. I'll tweet about it.
Bye,
Jean
Hi,
Sorry for late reply. It works like a charm! thanks!