Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(marker): logical error when setting faceCamera #686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions imports/marker/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ local defaultRotation = vector3(0, 0, 0)
local defaultDirection = vector3(0, 0, 0)
local defaultColor = { r = 255, g = 255, b = 255, a = 100 }
local defaultSize = { width = 2, height = 1 }
local defaultBobUpAndDown = false
local defaultFaceCamera = true
local defaultRotate = false
local defaultTextureDict = nil
local defaultTextureName = nil

Expand Down Expand Up @@ -152,9 +149,9 @@ function lib.marker.new(options)
self.height = options.height or defaultSize.height
self.rotation = options.rotation or defaultRotation
self.direction = options.direction or defaultDirection
self.bobUpAndDown = options.bobUpAndDown or defaultBobUpAndDown
self.faceCamera = options.faceCamera or defaultFaceCamera
self.rotate = options.rotate or defaultRotate
self.bobUpAndDown = type(options.bobUpAndDown) == 'boolean' and options.bobUpAndDown
self.faceCamera = type(options.faceCamera) ~= 'boolean' or options.faceCamera
self.rotate = type(options.rotate) == 'boolean' and options.rotate
self.textureDict = options.textureDict or defaultTextureDict
self.textureName = options.textureName or defaultTextureName
self.draw = drawMarker
Expand Down