sdf
This commit is contained in:
parent
ea8a74e323
commit
e3886c3d6f
@ -25,7 +25,7 @@
|
|||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.@"raylib-zig" = .{
|
.@"raylib-zig" = .{
|
||||||
.url = "https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz",
|
.url = "https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz",
|
||||||
.hash = "1220c61380facb4480c01109fda97cf1a37f45308c522a84fdea142ca625593ddc2a",
|
.hash = "122058d3ea6318efb819d0bffba630afd1a459fa3a99b4bfe4b680a937d5de04d2fc",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
@ -78,8 +78,8 @@ const Particle = struct {
|
|||||||
self.velocity.a.y += val;
|
self.velocity.a.y += val;
|
||||||
}
|
}
|
||||||
pub fn applyForce(self: *Self, vec: pr.Vec) void {
|
pub fn applyForce(self: *Self, vec: pr.Vec) void {
|
||||||
self.acceleration.a.x = vec.a.x * 0.8;
|
self.acceleration.a.x += vec.a.x * 0.8;
|
||||||
self.acceleration.a.y = vec.a.y * 0.8;
|
self.acceleration.a.y += vec.a.y * 0.8;
|
||||||
self.acceleration.a.z = vec.a.z;
|
self.acceleration.a.z = vec.a.z;
|
||||||
self.velocity.a.x *= 0.995;
|
self.velocity.a.x *= 0.995;
|
||||||
self.velocity.a.y *= 0.995;
|
self.velocity.a.y *= 0.995;
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user