preloadCamera – Talk
m (add. missing signature) |
(Added some thoughts about preloadCamera) |
||
Line 38: | Line 38: | ||
::I think he meant [[camPreload]]. [[camPreloaded]] is just there to check how far the preloading came, I think. Maybe preloadCamera is just a "shortcut". Or, other suggestion, it preloads a scene somewhere, while [[camPreload]] loads the scene taking the cam's settings (fov, target, etc) into account. --[[User:Raedor|raedor]] 15:58, 12 November 2008 (CET) | ::I think he meant [[camPreload]]. [[camPreloaded]] is just there to check how far the preloading came, I think. Maybe preloadCamera is just a "shortcut". Or, other suggestion, it preloads a scene somewhere, while [[camPreload]] loads the scene taking the cam's settings (fov, target, etc) into account. --[[User:Raedor|raedor]] 15:58, 12 November 2008 (CET) | ||
:Maybe helpful thoughts: | |||
kju: | |||
so the difference is the 'preloadCamera' does it 360°, while camPreload only for the view of the cam? | |||
Spooner: | |||
No, preloadCamera does it at [x,y,z]. camPreload does at at the position of an already created camera object. | |||
The later may only do it in a specific direction though, as you suggest. Dunno. | |||
kju: | |||
yes correct. i mean in a practical sense | |||
Spooner: | |||
Oh, no idea. | |||
kju: | |||
for preloadCamera you have to set the position yourself sure. | |||
however you have to place the camera for camPreload too | |||
at least i guess so. no idea about camera.sqs camera | |||
Spooner: | |||
Well, camPreload assumes you have created a camera object and placed it, but will not be using it for a few seconds. preloadCamera could be used in the same way, but is best for when you are moving from remote camera to player object or if you are just about to do a long setpos player. | |||
kju: | |||
right.however i still wonder if the camP only loads the visibile scene, while preloadC does it to every object at 360° at a certain / the viewdistance. |
Revision as of 20:28, 12 November 2008
This example is confusing to me. Why would you spawn with a waitUntil?? doolittle
spawn in this case has nothing to do with respawning. It merely means to start a new script, check the spawn command in the comref.
Edit: Unless I misunderstood your question, in which case.....sorry.
Planck 00:05, 22 May 2007 (CEST)
The example merely means to waituntil preloadcamera returns true. hoz
Right... but the waitUntil is pointless. That's all I mean. --Doolittle 01:23, 22 May 2007 (CEST)
- At best, Spawn is redundant. For waituntil to work, you need to already be in a 'spawned' (sleepable) script.
- Properly typechecked it would probably be a syntax error.
- At worst, it will run the preloadcommand after (if at all) it has proceeded with whatever code is below the waituntil.
- --MaHuJa 16:57, 28 June 2007 (CEST)
The example with waitUntil is bad.
waitUntil will execute the command until condition is true, in this case it will result in multiple preloadCamera commands being issued.
--Cleanrock 17:19, 28 June 2007 (CEST)
- yeah, fixed it. The command is it's own waitUntil. --Salisan 17:52, 28 June 2007 (CEST)
- Actually, it's correct. The command just works that strangely.. It'll check if everything at the position is ready each time it's executed and doesn't return true until it is. Must be insanely inefficient. --Salisan 18:00, 28 June 2007 (CEST)
ok, if it is a polling function which returns false or true immediately the waitUntil example is just fine
--Cleanrock 16:58, 29 June 2007 (CEST)
Difference between this and camPreloaded?
Does anyone know the difference between this command and the camPreloaded one? Aside from the obvious (input data types). --General Barron 04:58, 12 November 2008 (CET)
- Although not a technically correct definition... I'd imagine that the tasks involved in loading resources within the Engine for a new camera maybe an intensive process, so I'd imagine that preloadCamera is async. based. And, if this async. work was being done in a given scripting 'thread' the camPreloaded then provides a simple faciltiy to 'test' if complete from another given scripting 'thread'. Rather than having to pass about the boolean from the 'preloadCamera' command.
- 'preloadCamera' does the 'work' so to speak and 'camPreloaded' is a 'test' if the work has completed successfully or not... a little awkward, but still useful, imo.
- btw, s'all untested supposition on my part. -- Sy 13:59, 12 November 2008 (CET)
- I think he meant camPreload. camPreloaded is just there to check how far the preloading came, I think. Maybe preloadCamera is just a "shortcut". Or, other suggestion, it preloads a scene somewhere, while camPreload loads the scene taking the cam's settings (fov, target, etc) into account. --raedor 15:58, 12 November 2008 (CET)
- Maybe helpful thoughts:
kju: so the difference is the 'preloadCamera' does it 360°, while camPreload only for the view of the cam? Spooner: No, preloadCamera does it at [x,y,z]. camPreload does at at the position of an already created camera object. The later may only do it in a specific direction though, as you suggest. Dunno. kju: yes correct. i mean in a practical sense Spooner: Oh, no idea. kju: for preloadCamera you have to set the position yourself sure. however you have to place the camera for camPreload too at least i guess so. no idea about camera.sqs camera Spooner: Well, camPreload assumes you have created a camera object and placed it, but will not be using it for a few seconds. preloadCamera could be used in the same way, but is best for when you are moving from remote camera to player object or if you are just about to do a long setpos player. kju: right.however i still wonder if the camP only loads the visibile scene, while preloadC does it to every object at 360° at a certain / the viewdistance.