I am implementing screen mapping with the following code (the code is incomplete, just showing the idea), but I am unable to rotate the screen, and would like to know if I can do it somehow? I am learning to write programs, but am not yet capable of solving this problem.
[SCRIPTABLE_DISPLAY_...]
MESHES = zhongkong_3d
RESOLUTION =2048, 2048
DISPLAY_POS = 0, 0
DISPLAY_SIZE =2048,2048
FORCE_UPDATE_AFTER = RENDERING_CAMERA_6 ; this display is going to be updated each time navigator is drawn
KEEP_BACKGROUND = 0 ; and without clearing step, so we would draw on top of navigator
SCRIPT = '
function update()
if Input ~= TURNSIGNAL_RIGHT then
-- If gear is not reverse, activate navigator:
--ac.setDynamicTextureShift("car::yibiao.dds", 1) ---- this function sets its opacity, it can do more
--display.image{pos = vec2(0, 0), size = vec2(886, 195), image ="car::yibiao.dds"}
ac.setRenderingCameraActive("RENDERING_CAMERA_6", false) -- pause rendering camera
ac.setRenderingCameraActive("RENDERING_CAMERA_3", false) -- pause rendering camera
return -- and we’re done here, so let’s stop
end
ac.setDynamicTextureShift("car::3D arround.dds", 1) ---- this function sets its opacity, it can do more
display.image{pos = vec2(0, 0), size = vec2(2048, 768), image ="car::3D arround.dds"}
--*********************************--
[RENDERING_CAMERA_6]
DYNAMIC_TEXTURE_ID = camera_rear_6 ; here, we will create “dynamic::camera_rear6” texture
POSITION = -1.80, 1.5, -3.5
DIRECTION = 0.023, -0.03, 0.07
INCLUDE_CAR = 1
REFRESH_RATE = 60 ; doesn’t need to update too often, those in-car cameras are usually pretty nasty
INTERIOR_ONLY = 1 ; stop rendering if camera is not interior one
CLIP_NEAR = 0.001 ; the way it’s positioned, it needs to render things that are very close (bits of car)
FOV = 65 ; huge FOV to get that authentic look
RESOLUTION = 1990, 1243 ; and massive resolution too
ACTIVE_BY_DEFAULT = 0 ; inactive by default, activated by a script
WITH_LIGHTING = 1
--*********************************--