OfflineRigidbody - Add a Getter for the RigidbodyPauser
#756
Closed
AustinEast
started this conversation in
Feature Request
Replies: 4 comments 1 reply
-
Doesn't this already exists?
…On Thu, Aug 15, 2024, 6:01 PM Austin East ***@***.***> wrote:
I've recently found the need to access the RigidbodyPauser in my Offline
Rigidbodies to work with my pooling system - my projectiles have the
possibility of getting spawned from the pool with their rigidbodies paused,
but i need to be able to set their velocity in that moment, so heres what
works for me:
// Pooled Projectile Spawning logic...
...
if (projectileObject.TryGetComponent<OfflineRigidbody>(out var offlineRigidbody)){
var rigidbodyPauser = offlineRigidbody.GetRigidbodyPauser();
rigidbodyPauser.Unpause();}
if (projectileObject.TryGetComponent<Rigidbody>(out var projectileRigidbody) && !projectileRigidbody.isKinematic){
projectileRigidbody.velocity = direction * gunSettings.projectileSettings.speed;}
if (PredictionManager.IsReconciling && offlineRigidbody != null){
var rigidbodyPauser = offlineRigidbody.GetRigidbodyPauser();
rigidbodyPauser.Pause();
My request is to add a getter like this to make this possible:
public partial class OfflineRigidbody : MonoBehaviour{
...
public RigidbodyPauser GetRigidbodyPauser() => _rigidbodyPauser;}
—
Reply to this email directly, view it on GitHub
<#756>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGPJC3UDR43HSZDRVNU3UQLZRUQKJAVCNFSM6AAAAABMS7CGTWVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGA2TOOBVGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
This was added some releases ago after your request. Closing :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't see where it's been added in |
Beta Was this translation helpful? Give feedback.
0 replies
-
Oh offline rigidbody, sorry. It has not been added. I will expose it but I
can probably do you one better though next update or the one after that.
…On Sun, Oct 6, 2024, 6:26 PM Austin East ***@***.***> wrote:
I don't see where it's been added in OfflineRigidbody, am i missing a
partial class somewhere?
—
Reply to this email directly, view it on GitHub
<#756 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGPJC3S3FGDCJKK3A7CT4VDZ2G2JVAVCNFSM6AAAAABMS7CGTWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBWGEZTKOA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've recently found the need to access the
RigidbodyPauser
in my Offline Rigidbodies to work with my pooling system - my projectiles have the possibility of getting spawned from the pool with their rigidbodies paused, but i need to be able to set their velocity in that moment, so heres what works for me:My request is to add a getter like this to make this possible:
Beta Was this translation helpful? Give feedback.
All reactions