Commit Graph

16 Commits

Author SHA1 Message Date
kobewi
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
Omar El Sheikh
2425d798cd Octahedral Normal Support for Sprite and Soft Body
Properly encode the normal and tangent vectors with octahedral
compression
2022-08-20 10:01:46 -07:00
Ricardo Buring
74f41f8560 Fix SoftDynamicBody3D normals
Store normal vector in A2B10G10R10 format.
2022-08-04 23:10:04 +02:00
Rémi Verschelde
5c3081dae2 SoftBody: Fix attachments property names after #61180
Fixes #61581.
2022-06-10 14:16:14 +02:00
Haoyu Qiu
fc3b845c07 Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-19 14:08:47 +08:00
Aaron Franke
fa7a7795f0
Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
Rémi Verschelde
7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
reduz
8b547331be Create GDExtension clases for PhysicsServer3D
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer

This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-15 18:39:31 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Rémi Verschelde
7da392bcc5
Don't return reference on copy assignment operators
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.

According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.

This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Lightning_A
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
PouleyKetchoupp
e6f7235ffb Fix SoftDynamicBody3D crash when setting disable mode
Proper logic for changing physics state when disabled and disabled mode
is changed (it was unnecessarily making calls to re-initialize physics).

Extra error handling in soft body implementations to avoid crashes with
invalid mesh.
2021-10-21 08:56:12 -07:00
PouleyKetchoupp
1f816979f6 Fix SoftDynamicBody3D memory corruption when switching mesh at runtime
When switching the mesh at runtime, the physics server wasn't properly
updated with the new mesh. Now we keep track of the soft body mesh to
make sure everything is properly initialized on pre-draw.

Also cleaned a few things around private methods.
2021-10-20 10:57:08 -07:00
Haoyu Qiu
d000ce9130 Re-prepare RenderingServer if SoftDynamicBody mesh changed 2021-10-06 23:25:11 +08:00
PouleyKetchoupp
b8eeb34b4e Remove scene code in physics servers
Replaced Mesh with mesh RID in Godot Physics 3D and Bullet.
2021-10-01 08:42:47 -07:00
PouleyKetchoupp
85819b199a Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBody 2021-09-16 09:55:20 -07:00