A-Frame's camera rotation speed - html5-video

I am using A-Frame to render my 360 videos. I have the rotation set at 0 270 0 on the camera. When I rotate the video it is a bit slow. I tried to play around with the Y-axis angle but it doesn't have any effect on the rotation. I tried the wasd-controls with accelaration property too.
Is there a way to make the rotation smooth and fast so that when I drag a mouse on the video it spins faster?
<a-entity look-controls="enabled: true; reverseMouseDrag: true"
wasd-controls="acceleration: 100;">
</a-entity>
I tried using the universal-controls rotationSensitivity property but it was of no effect. Please advise. Any help on this appreciated.

The wasd controls acceleration attribute only works on movement speed,
The look-controls, don't have a rotation speed attribute.
Don McCurdy's universal-controls from the aframe-extras, have a sensitivity option, called rotationSensitivity, You can easily change it:
<a-entity camera universal-controls="rotationSensitivity:1"></a-entity>
Check it out on my live fiddle: https://jsfiddle.net/8gfmL1n1/.

Related

How to make 3d text to appear on camera view in blender

I am creating a 3d text on blender2.8 but I am having a hard time trying to make it appear on the camera view.
I have tried rotating and scaling the camera but it doesn't help.
The camera object is the focal point for the final image, like in real life, if you want to get more in the picture you need to move the camera back or zoom out.
With the camera close -
With the camera far away -
To zoom out, you reduce the camera's focal length.

Replicating Camera View - DeviceOrientationControls to TrackballControls

I am trying to replicate a view from a phone (using DeviceOrientationControls) to a desktop (using TrackballControls). I am passing the view state (camera position & direction) through an intermediary server, and have that part mostly working.
I'm having trouble setting the camera rotation on the desktop. The cameras are sync'd to look at the same point, but the view on the desktop (receiving the view state from the phone) rotates around the view angle.
I definitely don't fully understand quaternions or rotation order. I've tried applying those, but clearly I'm out of my element. I guess I'm just looking for some hints on how to sync the camera rotation on the desktop.
Looks like I had a (trackball) controls.update() in my animate() that was blowing away the rotation that I was setting. Camera position and direction are not changed by this, but the rotation (or the "roll" of the camera) was.
In TrackballControls, it would be nice to have a setting for programmatically updating the camera's rotation that wouldn't get squashed by a call to rotateCamera(). I'll have to think about that, because it doesnt seem like it would be easy to implement.

Objects distort if near the canvas sides - three.js

I have a three.js scene with spheres, but when I zoom in a sphere and I move with orbit controls so it is in the side of the canvas (on in the center and deep in) it looses its round shape (do not care about the lines) :
What can I do ?
There will always be some distortion, but it is worse with a large camera field-of-view (fov).
A reasonable value for camera.fov is 40-45 degrees. A smaller value would produce less distortion.
camera = new THREE.PerspectiveCamera( fov, aspect, near, far );
And for reference, camera.fov is the field-of-view in the vertical direction.
three.js r.70
This is expected behaviour of a THREE.PerspectiveCamera. Try it yourself with a digital camera at home.
The only real way to fix it is to use an THREE.OrthographicCamera, but this likely has other issues you do not want to have, such as objects not becoming smaller when they are further away.

Rotating Camera Around Self, limiting rotation angle in ThreeJS

I am using Three.JS to create a scene.
I want to be able to set my camera in the corner of a room and have the viewer rotate the camera around on the spot, without moving the camera's position.
Also, I want to limit the span of rotation (so that they cannot rotate the camera to look behind them).
I found FirstPersonControls, but I want the user to have to click and drag to rotate the view.
I know of the minecraft example, but it doesn't do the click and drag or angle restriction.
Does anyone know of any other existing examples that accomplish something similar? Thanks.

Orthographic camera and zoom controls in SceneKit

When using a camera with myCameraNode.camera.usesOrthographicProjection = YES;, as far as I can tell you can't zoom as you normally would using the default controls given by myScene.allowsCameraControl = YES; – the only way to zoom that I can tell is by changing myCameraNode.scale = (SCNVector3*)...
Is there a way to somehow bind the scroll wheel to this scale parameter, while retaining the standard camera controls for rotation/translation? Or to otherwise 'fix' the default camera controls?
Edit: I think I'm misunderstanding how the camera works. The two-finger zoom gesture does still work with orthographic projection, but it seems like it only lets me zoom out and not let me zoom in any further. I suspect it may be related to the myCameraNode.scale, but if I don't set that parameter the objects in my scene are huge and I only see a tiny fraction of it (and the larger the scale the smaller my objects get).
The built-in camera controls on SCNView are pretty basic, probably best used only for debugging. For a production app, it's better to control the camera yourself, especially if you're using orthographic projection. Set up your own event handling that controls the orthographicScale property of the camera, and you're set.
Followup on comment:
The scale property on SCNNode controls how big a node's content is relative to its parent node — it's a coordinate space transformation, just like rotation and position. It's not really appropriate for implementing camera zoom. In a perspective projection, you use the camera's xFov and/or yFov properties to zoom (and I presume that's what the built-in camera controls do). The API doesn't define what the controls do for an orthographic camera, so anything you observe about its behavior is probably undefined and might be a bug... you might not be able to rely on it staying that way.
If there's more you'd like the built-in camera controls to handle, I'd recommend filing an enhancement request.