dimforge / dimforge/nphysics

RigdBodyDesc can't be stored

Open
#205 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.6k
Forks
120
PR merge metrics
No merged PRs in 30d

Description

The RigidBodyDesc accept a reference to the colliders https://github.com/rustsim/nphysics/blob/master/src/object/rigid_body.rs#L727

The problem is that due to the lifetime used there is not possible to store the RigidBodyDesc in the heap and move it around.

Since the RigidBody only exist inside the world, and I need to manipulate its parameters even out of the world, would be nice to be able to store them directly inside the descriptor.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/object/rigid_body.rs around line 727, where RigidBodyDesc references colliders, and trace how the descriptor is created and passed into the world. Determine an ownership design that allows the descriptor to be stored on the heap, moved, and used to manipulate parameters outside the world; done means this workflow is supported without the current lifetime restriction.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.