Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Animating rod rest position
#30
(10-06-2021, 11:38 AM)Hakazaba Wrote: Where exactly should i be setting position and orientation? The values i keep finding only have a get

You get/set positions and orientations by reading from/writing to an array. Check the manual:
http://obi.virtualmethodstudio.com/tutor...icles.html

for instance, to set the position of the first particle in a solver to zero:
Code:
solver.positions[0] = Vector3.zero;

to get it:
Code:
var pos = solver.positions[0];

Same for orientations, velocities, mass, radius, etc. All data in Obi is expressed in the solver's local space, the data you get is solver space, and the data you set is expected to be solver space.

actor.GetParticlePosition() and GetParticleOrientation() (which I guess are the ones you found) are just helper methods that retrieve world space values for convenience. They're quite slow though, it's best to access the data directly.
Reply


Messages In This Thread
Animating rod rest position - by Hakazaba - 02-05-2021, 02:47 PM
RE: Animating rod rest position - by josemendez - 03-05-2021, 11:05 AM
RE: Animating rod rest position - by Hakazaba - 04-05-2021, 06:12 AM
RE: Animating rod rest position - by josemendez - 04-05-2021, 08:12 AM
RE: Animating rod rest position - by Hakazaba - 04-05-2021, 12:55 PM
RE: Animating rod rest position - by Hakazaba - 05-05-2021, 12:53 AM
RE: Animating rod rest position - by josemendez - 05-05-2021, 09:08 AM
RE: Animating rod rest position - by Hakazaba - 05-05-2021, 06:28 AM
RE: Animating rod rest position - by josemendez - 05-05-2021, 08:10 AM
RE: Animating rod rest position - by Hakazaba - 05-05-2021, 11:54 AM
RE: Animating rod rest position - by josemendez - 05-05-2021, 02:06 PM
RE: Animating rod rest position - by Hakazaba - 05-05-2021, 04:01 PM
RE: Animating rod rest position - by josemendez - 05-05-2021, 05:18 PM
RE: Animating rod rest position - by Hakazaba - 06-05-2021, 04:53 AM
RE: Animating rod rest position - by josemendez - 06-05-2021, 07:38 AM
RE: Animating rod rest position - by Hakazaba - 06-05-2021, 09:12 AM
RE: Animating rod rest position - by josemendez - 06-05-2021, 09:46 AM
RE: Animating rod rest position - by Hakazaba - 06-05-2021, 02:55 PM
RE: Animating rod rest position - by Hakazaba - 08-05-2021, 01:04 AM
RE: Animating rod rest position - by josemendez - 10-05-2021, 09:11 AM
RE: Animating rod rest position - by Hakazaba - 23-05-2021, 04:27 AM
RE: Animating rod rest position - by josemendez - 24-05-2021, 07:37 AM
RE: Animating rod rest position - by Hakazaba - 31-05-2021, 06:53 AM
RE: Animating rod rest position - by josemendez - 31-05-2021, 07:45 AM
RE: Animating rod rest position - by Hakazaba - 01-06-2021, 03:30 AM
RE: Animating rod rest position - by josemendez - 01-06-2021, 07:50 AM
RE: Animating rod rest position - by Hakazaba - 02-06-2021, 05:55 AM
RE: Animating rod rest position - by josemendez - 02-06-2021, 08:00 AM
RE: Animating rod rest position - by Hakazaba - 10-06-2021, 11:38 AM
RE: Animating rod rest position - by josemendez - 10-06-2021, 11:46 AM
RE: Animating rod rest position - by Hakazaba - 11-06-2021, 04:18 PM
RE: Animating rod rest position - by josemendez - 11-06-2021, 04:35 PM
RE: Animating rod rest position - by Hakazaba - 11-06-2021, 06:54 PM
RE: Animating rod rest position - by josemendez - 14-06-2021, 02:15 PM
RE: Animating rod rest position - by Hakazaba - 16-06-2021, 03:33 PM
RE: Animating rod rest position - by josemendez - 16-06-2021, 04:54 PM
RE: Animating rod rest position - by Hakazaba - 16-06-2021, 11:43 PM
RE: Animating rod rest position - by josemendez - 17-06-2021, 08:14 AM
RE: Animating rod rest position - by Hakazaba - 17-06-2021, 02:08 PM
RE: Animating rod rest position - by Hakazaba - 19-06-2021, 03:30 AM
RE: Animating rod rest position - by josemendez - 20-06-2021, 06:24 PM
RE: Animating rod rest position - by Hakazaba - 21-06-2021, 12:00 AM