mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-16 08:02:36 +00:00
Collision stuff
This commit is contained in:
@@ -8,6 +8,7 @@ class IMICFPS
|
||||
|
||||
def setup
|
||||
bind_model("base", "biped")
|
||||
@collision = :dynamic
|
||||
|
||||
@speed = 2.5 # meter's per second
|
||||
@running_speed = 6.8 # meter's per second
|
||||
|
||||
@@ -2,6 +2,7 @@ class IMICFPS
|
||||
class Skydome < Entity
|
||||
def setup
|
||||
bind_model("base", "skydome")
|
||||
@collision = :none
|
||||
end
|
||||
|
||||
def draw
|
||||
|
||||
@@ -7,7 +7,7 @@ class IMICFPS
|
||||
include GLU
|
||||
include CommonMethods
|
||||
attr_accessor :scale, :visible, :renderable, :backface_culling
|
||||
attr_reader :position, :rotation, :velocity
|
||||
attr_reader :position, :rotation, :velocity, :collision
|
||||
attr_reader :model, :name, :debug_color, :bounding_box
|
||||
def initialize(x: 0, y: 0, z: 0, bound_model: nil, scale: MODEL_METER_SCALE, backface_culling: true, auto_manage: true, manifest_file: nil)
|
||||
@position = Vector.new(x, y, z)
|
||||
@@ -22,8 +22,8 @@ class IMICFPS
|
||||
@debug_color = Color.new(0.0, 1.0, 0.0)
|
||||
|
||||
@collidable = [:static, :dynamic]
|
||||
@collision = :static # :dynamic, moves in response, :static, does not move ever, :none, entities can pass through
|
||||
@physics = false
|
||||
@collision = :static # :dynamic => moves in response, :static => does not move ever, :none => no collision check, entities can pass through
|
||||
@physics = false # Entity affected by gravity and what not
|
||||
@mass = 100 # kg
|
||||
|
||||
@delta_time = Gosu.milliseconds
|
||||
|
||||
Reference in New Issue
Block a user