physics

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlayerRadius        = 0.45
	PlayerEyeHeight     = 0.9
	PlayerCrouchEye     = 0.45
	JumpVelocity        = -0.36
	Epsilon             = 1e-6
	DiagonalFactor      = 0.70710678
	FallDamageVel       = 0.58
	FallSlowDownVel     = 0.24
	FallDamageScalar    = 4096.0
	MaxVerticalVelocity = 3.0
)

Variables

This section is empty.

Functions

func CalculateDamage

func CalculateDamage(weapon protocol.WeaponType, hitType protocol.HitType, distance float32) uint8

func CalculateSpread

func CalculateSpread(weapon protocol.WeaponType) float32

func CanSee

func CanSee(vxlMap *vxl.Map, from, to protocol.Vector3f) bool

func MoveGrenade

func MoveGrenade(vxlMap *vxl.Map, position, velocity *protocol.Vector3f, dt float32) int

func MovePlayer

func MovePlayer(p *player.Player, vxlMap *vxl.Map, dt float32, gameTime float32) int8

func TryUncrouch

func TryUncrouch(p *player.Player, vxlMap *vxl.Map) bool

func ValidateHit

func ValidateHit(shooter, target protocol.Vector3f, orientation protocol.Vector3f, tolerance float32) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL